home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / MPWPascal / PExamples / TubeTest.p < prev    next >
MacBinary  |  1988-11-30  |  14.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Nov 30 12:00:00 1988, modified Wed Nov 30 12:00:00 1988, creator 'MPS ', type ASCII, 13602 bytes "TubeTest.p" , at 0x35a2 431 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 54 75 62 65 54 65 | 73 74 2e 70 00 00 00 00 |..TubeTe|st.p....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 35 22 00 | 00 01 af 9f b9 d9 90 9f |.....5".|........|
|00000060| b9 d9 90 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 00 c7 00 00 |........|........|
|00000080| 7b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |{-------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|000000d0| 23 0d 23 09 4d 61 63 69 | 6e 74 6f 73 68 20 44 65 |#.#.Maci|ntosh De|
|000000e0| 76 65 6c 6f 70 65 72 20 | 54 65 63 68 6e 69 63 61 |veloper |Technica|
|000000f0| 6c 20 53 75 70 70 6f 72 | 74 0d 23 0d 23 09 53 69 |l Suppor|t.#.#.Si|
|00000100| 6d 70 6c 65 20 43 6f 6c | 6f 72 20 51 75 69 63 6b |mple Col|or Quick|
|00000110| 44 72 61 77 20 41 6e 69 | 6d 61 74 69 6f 6e 20 53 |Draw Ani|mation S|
|00000120| 61 6d 70 6c 65 20 41 70 | 70 6c 69 63 61 74 69 6f |ample Ap|plicatio|
|00000130| 6e 0d 23 0d 23 09 54 75 | 62 65 54 65 73 74 0d 23 |n.#.#.Tu|beTest.#|
|00000140| 0d 23 09 54 75 62 65 54 | 65 73 74 2e 70 09 2d 09 |.#.TubeT|est.p.-.|
|00000150| 50 61 73 63 61 6c 20 53 | 6f 75 72 63 65 0d 23 0d |Pascal S|ource.#.|
|00000160| 23 09 43 6f 70 79 72 69 | 67 68 74 20 a9 20 31 39 |#.Copyri|ght . 19|
|00000170| 38 38 20 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |88 Apple| Compute|
|00000180| 72 2c 20 49 6e 63 2e 0d | 23 09 41 6c 6c 20 72 69 |r, Inc..|#.All ri|
|00000190| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0d 23 |ghts res|erved..#|
|000001a0| 0d 23 09 56 65 72 73 69 | 6f 6e 73 3a 09 31 2e 31 |.#.Versi|ons:.1.1|
|000001b0| 09 28 4d 50 57 20 33 2e | 30 20 46 69 6e 61 6c 29 |.(MPW 3.|0 Final)|
|000001c0| 09 38 2f 38 38 0d 23 0d | 23 09 43 6f 6d 70 6f 6e |.8/88.#.|#.Compon|
|000001d0| 65 6e 74 73 3a 09 54 75 | 62 65 54 65 73 74 2e 70 |ents:.Tu|beTest.p|
|000001e0| 09 09 09 41 75 67 75 73 | 74 20 38 2c 20 31 39 38 |...Augus|t 8, 198|
|000001f0| 38 0d 23 09 09 09 09 54 | 75 62 65 54 65 73 74 2e |8.#....T|ubeTest.|
|00000200| 63 09 09 09 41 75 67 75 | 73 74 20 38 2c 20 31 39 |c...Augu|st 8, 19|
|00000210| 38 38 0d 23 09 09 09 09 | 54 75 62 65 54 65 73 74 |88.#....|TubeTest|
|00000220| 2e 72 09 09 09 41 75 67 | 75 73 74 20 38 2c 20 31 |.r...Aug|ust 8, 1|
|00000230| 39 38 38 0d 23 09 09 09 | 09 28 50 29 54 75 62 65 |988.#...|.(P)Tube|
|00000240| 54 65 73 74 2e 6d 61 6b | 65 09 41 75 67 75 73 74 |Test.mak|e.August|
|00000250| 20 38 2c 20 31 39 38 38 | 0d 23 09 09 09 09 28 43 | 8, 1988|.#....(C|
|00000260| 29 54 75 62 65 54 65 73 | 74 2e 6d 61 6b 65 09 41 |)TubeTes|t.make.A|
|00000270| 75 67 75 73 74 20 38 2c | 20 31 39 38 38 0d 23 0d |ugust 8,| 1988.#.|
|00000280| 23 09 54 68 65 20 54 75 | 62 65 54 65 73 74 20 70 |#.The Tu|beTest p|
|00000290| 72 6f 67 72 61 6d 20 69 | 73 20 61 20 73 69 6d 70 |rogram i|s a simp|
|000002a0| 6c 65 20 64 65 6d 6f 6e | 73 74 72 61 74 69 6f 6e |le demon|stration|
|000002b0| 20 6f 66 20 68 6f 77 20 | 74 6f 20 75 73 65 20 74 | of how |to use t|
|000002c0| 68 65 20 50 61 6c 65 74 | 74 65 20 0d 23 09 4d 61 |he Palet|te .#.Ma|
|000002d0| 6e 61 67 65 72 20 69 6e | 20 61 20 63 6f 6c 6f 72 |nager in| a color|
|000002e0| 20 70 72 6f 67 72 61 6d | 2e 20 20 49 74 20 68 61 | program|. It ha|
|000002f0| 73 20 61 20 73 70 65 63 | 69 61 6c 20 63 6f 6c 6f |s a spec|ial colo|
|00000300| 72 20 70 61 6c 65 74 74 | 65 20 74 68 61 74 20 69 |r palett|e that i|
|00000310| 73 20 61 73 73 6f 63 69 | 61 74 65 64 0d 23 09 77 |s associ|ated.#.w|
|00000320| 69 74 68 20 74 68 65 20 | 6d 61 69 6e 20 77 69 6e |ith the |main win|
|00000330| 64 6f 77 2e 20 20 54 68 | 65 20 63 6f 6c 6f 72 73 |dow. Th|e colors|
|00000340| 20 61 72 65 20 61 6e 69 | 6d 61 74 65 64 20 75 73 | are ani|mated us|
|00000350| 69 6e 67 20 74 68 65 20 | 50 61 6c 65 74 74 65 20 |ing the |Palette |
|00000360| 4d 61 6e 61 67 65 72 20 | 0d 23 09 74 6f 20 67 69 |Manager |.#.to gi|
|00000370| 76 65 20 61 20 66 6c 6f | 77 69 6e 67 20 74 75 62 |ve a flo|wing tub|
|00000380| 65 20 65 66 66 65 63 74 | 2e 20 20 54 68 65 20 70 |e effect|. The p|
|00000390| 72 6f 67 72 61 6d 20 69 | 73 20 76 65 72 79 20 73 |rogram i|s very s|
|000003a0| 69 6d 70 6c 65 2c 20 61 | 6e 64 20 74 68 65 20 50 |imple, a|nd the P|
|000003b0| 61 6c 65 74 74 65 0d 23 | 09 4d 61 6e 61 67 65 72 |alette.#|.Manager|
|000003c0| 20 61 6e 64 20 64 72 61 | 77 69 6e 67 20 70 61 72 | and dra|wing par|
|000003d0| 74 73 20 61 72 65 20 70 | 75 74 20 69 6e 20 73 65 |ts are p|ut in se|
|000003e0| 70 61 72 61 74 65 20 73 | 75 62 72 6f 75 74 69 6e |parate s|ubroutin|
|000003f0| 65 73 20 74 6f 20 6d 61 | 6b 65 20 69 74 20 65 61 |es to ma|ke it ea|
|00000400| 73 69 65 72 0d 23 09 74 | 6f 20 66 69 67 75 72 65 |sier.#.t|o figure|
|00000410| 20 6f 75 74 20 77 68 61 | 74 20 69 73 20 68 61 70 | out wha|t is hap|
|00000420| 70 65 6e 69 6e 67 2e 0d | 23 09 0d 23 09 54 68 65 |pening..|#..#.The|
|00000430| 20 70 72 6f 67 72 61 6d | 20 69 73 20 73 74 69 6c | program| is stil|
|00000440| 6c 20 61 20 63 6f 6d 70 | 6c 65 74 65 20 4d 61 63 |l a comp|lete Mac|
|00000450| 69 6e 74 6f 73 68 20 61 | 70 70 6c 69 63 61 74 69 |intosh a|pplicati|
|00000460| 6f 6e 20 77 69 74 68 20 | 61 20 4d 61 69 6e 20 45 |on with |a Main E|
|00000470| 76 65 6e 74 20 4c 6f 6f | 70 2c 0d 23 09 73 6f 20 |vent Loo|p,.#.so |
|00000480| 74 68 65 72 65 20 69 73 | 20 74 68 65 20 65 78 74 |there is| the ext|
|00000490| 72 61 20 63 6f 64 65 20 | 74 6f 20 72 75 6e 20 74 |ra code |to run t|
|000004a0| 68 65 20 4d 45 4c 2e 20 | 20 0d 23 09 0d 23 09 54 |he MEL. | .#..#.T|
|000004b0| 68 65 72 65 20 69 73 20 | 61 20 72 65 73 6f 75 72 |here is |a resour|
|000004c0| 63 65 20 66 69 6c 65 20 | 74 68 61 74 20 69 73 20 |ce file |that is |
|000004d0| 6e 65 63 65 73 73 61 72 | 79 20 61 73 20 77 65 6c |necessar|y as wel|
|000004e0| 6c 2c 20 74 6f 20 64 65 | 66 69 6e 65 20 74 68 65 |l, to de|fine the|
|000004f0| 20 4d 65 6e 75 73 2c 20 | 57 69 6e 64 6f 77 2c 0d | Menus, |Window,.|
|00000500| 23 09 44 69 61 6c 6f 67 | 2c 20 61 6e 64 20 50 61 |#.Dialog|, and Pa|
|00000510| 6c 65 74 74 65 20 72 65 | 73 6f 75 72 63 65 73 20 |lette re|sources |
|00000520| 75 73 65 64 20 69 6e 20 | 74 68 65 20 70 72 6f 67 |used in |the prog|
|00000530| 72 61 6d 2e 20 20 0d 23 | 0d 23 09 53 65 65 20 53 |ram. .#|.#.See S|
|00000540| 61 6d 70 6c 65 20 61 6e | 64 20 54 45 53 61 6d 70 |ample an|d TESamp|
|00000550| 6c 65 20 66 6f 72 20 74 | 68 65 20 67 65 6e 65 72 |le for t|he gener|
|00000560| 61 6c 20 73 74 72 75 63 | 74 75 72 65 20 61 6e 64 |al struc|ture and|
|00000570| 20 4d 75 6c 74 69 46 69 | 6e 64 65 72 20 74 65 63 | MultiFi|nder tec|
|00000580| 68 6e 69 71 75 65 73 20 | 74 68 61 74 0d 23 09 77 |hniques |that.#.w|
|00000590| 65 20 72 65 63 6f 6d 6d | 65 6e 64 20 74 68 61 74 |e recomm|end that|
|000005a0| 20 79 6f 75 20 75 73 65 | 20 77 68 65 6e 20 62 75 | you use| when bu|
|000005b0| 69 6c 64 69 6e 67 20 61 | 20 6e 65 77 20 61 70 70 |ilding a| new app|
|000005c0| 6c 69 63 61 74 69 6f 6e | 2e 0d 23 0d 2d 2d 2d 2d |lication|..#.----|
|000005d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 7d 0d 0d 50 52 4f |--------|--}..PRO|
|00000620| 47 52 41 4d 20 54 75 62 | 65 54 65 73 74 3b 0d 20 |GRAM Tub|eTest;. |
|00000630| 28 2a 0d 09 46 69 6c 65 | 20 54 75 62 65 54 65 73 |(*..File| TubeTes|
|00000640| 74 2e 70 0d 0d 09 56 65 | 72 73 69 6f 6e 20 31 2e |t.p...Ve|rsion 1.|
|00000650| 30 3a 20 36 2f 32 2f 38 | 38 0d 09 0d 09 34 2f 31 |0: 6/2/8|8....4/1|
|00000660| 39 2f 38 38 3a 0d 09 54 | 75 62 65 54 65 73 74 20 |9/88:..T|ubeTest |
|00000670| 2d 2d 20 41 20 73 6d 61 | 6c 6c 20 73 61 6d 70 6c |-- A sma|ll sampl|
|00000680| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 77 72 |e applic|ation wr|
|00000690| 69 74 74 65 6e 20 62 79 | 20 42 6f 33 62 20 4a 6f |itten by| Bo3b Jo|
|000006a0| 68 6e 73 6f 6e 2e 0d 09 | 54 68 65 20 69 64 65 61 |hnson...|The idea|
|000006b0| 20 69 73 20 74 6f 20 64 | 72 61 77 20 74 77 6f 20 | is to d|raw two |
|000006c0| 63 69 72 63 6c 65 73 20 | 69 6e 20 76 61 72 79 69 |circles |in varyi|
|000006d0| 6e 67 20 63 6f 6c 6f 72 | 73 20 69 6e 20 74 68 65 |ng color|s in the|
|000006e0| 20 77 69 6e 64 6f 77 2c | 20 74 68 65 6e 0d 09 61 | window,| then..a|
|000006f0| 6e 69 6d 61 74 65 20 74 | 68 65 20 63 6f 6c 6f 72 |nimate t|he color|
|00000700| 73 20 77 68 65 6e 20 74 | 68 65 20 6d 65 6e 75 20 |s when t|he menu |
|00000710| 69 73 20 63 68 6f 73 65 | 6e 2e 09 54 68 69 73 20 |is chose|n..This |
|00000720| 69 73 20 61 20 63 6f 6d | 70 6c 65 74 65 20 70 72 |is a com|plete pr|
|00000730| 6f 67 72 61 6d 0d 09 77 | 69 74 68 20 65 76 65 6e |ogram..w|ith even|
|00000740| 74 20 6c 6f 6f 70 20 61 | 6e 64 20 65 76 65 72 79 |t loop a|nd every|
|00000750| 74 68 69 6e 67 2e 09 49 | 74 20 69 73 20 69 6e 74 |thing..I|t is int|
|00000760| 65 6e 64 65 64 20 74 6f | 20 62 65 20 61 20 73 69 |ended to| be a si|
|00000770| 6d 70 6c 65 20 65 78 61 | 6d 70 6c 65 20 6f 66 0d |mple exa|mple of.|
|00000780| 09 68 6f 77 20 74 6f 20 | 75 73 65 20 74 68 65 20 |.how to |use the |
|00000790| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 20 |Palette |Manager |
|000007a0| 74 6f 20 64 6f 20 73 6f | 6d 65 20 6d 69 6e 6f 72 |to do so|me minor|
|000007b0| 20 63 6f 6c 6f 72 20 61 | 6e 69 6d 61 74 69 6f 6e | color a|nimation|
|000007c0| 2c 20 61 6e 64 0d 09 68 | 6f 77 20 74 6f 20 75 73 |, and..h|ow to us|
|000007d0| 65 20 74 68 65 20 50 4d | 20 74 6f 20 73 65 74 20 |e the PM| to set |
|000007e0| 75 70 20 74 68 65 20 63 | 6f 6c 6f 72 73 20 64 65 |up the c|olors de|
|000007f0| 73 69 72 65 64 20 69 6e | 20 61 20 77 69 6e 64 6f |sired in| a windo|
|00000800| 77 2e 0d 09 0d 09 41 6c | 73 6f 20 73 65 65 20 74 |w.....Al|so see t|
|00000810| 68 65 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 |he resou|rce file|
|00000820| 20 74 68 61 74 20 67 6f | 65 73 20 77 69 74 68 20 | that go|es with |
|00000830| 74 68 69 73 20 74 6f 20 | 73 65 65 20 68 6f 77 20 |this to |see how |
|00000840| 74 68 65 20 50 61 6c 65 | 74 74 65 20 0d 09 69 74 |the Pale|tte ..it|
|00000850| 73 65 6c 66 20 69 73 20 | 6c 61 79 65 64 20 6f 75 |self is |layed ou|
|00000860| 74 2e 0d 09 0d 09 43 6f | 75 6c 64 20 62 65 20 62 |t.....Co|uld be b|
|00000870| 75 69 6c 74 20 77 69 74 | 68 20 73 6f 6d 65 74 68 |uilt wit|h someth|
|00000880| 69 6e 67 20 6c 69 6b 65 | 20 74 68 69 73 3a 0d 09 |ing like| this:..|
|00000890| 09 72 65 7a 20 54 75 62 | 65 54 65 73 74 2e 72 20 |.rez Tub|eTest.r |
|000008a0| 2d 6f 20 54 75 62 65 54 | 65 73 74 0d 09 09 70 61 |-o TubeT|est...pa|
|000008b0| 73 63 61 6c 20 54 75 62 | 65 54 65 73 74 2e 70 0d |scal Tub|eTest.p.|
|000008c0| 09 09 4c 69 6e 6b 20 54 | 75 62 65 54 65 73 74 2e |..Link T|ubeTest.|
|000008d0| 70 2e 6f 20 b6 0d 09 09 | 09 22 7b 4c 69 62 72 61 |p.o ....|."{Libra|
|000008e0| 72 69 65 73 7d 22 49 6e | 74 65 72 66 61 63 65 2e |ries}"In|terface.|
|000008f0| 6f 20 b6 0d 09 09 09 22 | 7b 4c 69 62 72 61 72 69 |o ....."|{Librari|
|00000900| 65 73 7d 22 52 75 6e 74 | 69 6d 65 2e 6f 20 b6 0d |es}"Runt|ime.o ..|
|00000910| 09 09 09 22 7b 50 4c 69 | 62 72 61 72 69 65 73 7d |..."{PLi|braries}|
|00000920| 22 50 61 73 6c 69 62 2e | 6f 20 b6 0d 09 09 09 2d |"Paslib.|o .....-|
|00000930| 6f 20 54 75 62 65 54 65 | 73 74 0d 09 09 54 75 62 |o TubeTe|st...Tub|
|00000940| 65 54 65 73 74 0d 20 2a | 29 0d 20 0d 20 7b 57 68 |eTest. *|). . {Wh|
|00000950| 65 72 65 20 64 6f 65 73 | 20 69 74 20 66 69 74 3a |ere does| it fit:|
|00000960| 0d 09 54 68 69 73 20 69 | 73 20 61 20 73 65 72 69 |..This i|s a seri|
|00000970| 65 73 20 6f 66 20 73 61 | 6d 70 6c 65 20 70 72 6f |es of sa|mple pro|
|00000980| 67 72 61 6d 73 20 66 6f | 72 20 74 68 6f 73 65 20 |grams fo|r those |
|00000990| 64 6f 69 6e 67 20 64 65 | 76 65 6c 6f 70 6d 65 6e |doing de|velopmen|
|000009a0| 74 0d 09 75 73 69 6e 67 | 20 43 6f 6c 6f 72 20 51 |t..using| Color Q|
|000009b0| 75 69 63 6b 44 72 61 77 | 2e 20 20 53 69 6e 63 65 |uickDraw|. Since|
|000009c0| 20 74 68 65 20 77 68 6f | 6c 65 20 63 6f 6c 6f 72 | the who|le color|
|000009d0| 20 70 72 6f 62 6c 65 6d | 20 64 65 70 65 6e 64 73 | problem| depends|
|000009e0| 0d 09 75 70 6f 6e 20 74 | 68 65 20 65 78 61 63 74 |..upon t|he exact|
|000009f0| 20 65 66 66 65 63 74 20 | 64 65 73 69 72 65 64 2c | effect |desired,|
|00000a00| 20 74 68 65 72 65 20 61 | 72 65 20 61 20 6e 75 6d | there a|re a num|
|00000a10| 62 65 72 20 6f 66 20 61 | 6e 73 77 65 72 73 0d 09 |ber of a|nswers..|
|00000a20| 74 6f 20 68 6f 77 20 74 | 6f 20 75 73 65 20 63 6f |to how t|o use co|
|00000a30| 6c 6f 72 73 2c 20 66 72 | 6f 6d 20 74 68 65 20 73 |lors, fr|om the s|
|00000a40| 69 6d 70 6c 65 20 74 6f | 20 74 68 65 20 72 61 64 |imple to| the rad|
|00000a50| 69 63 61 6c 6c 79 20 63 | 6f 6d 70 6c 65 78 2e 0d |ically c|omplex..|
|00000a60| 09 54 68 65 73 65 20 70 | 72 6f 67 72 61 6d 73 20 |.These p|rograms |
|00000a70| 74 72 79 20 74 6f 20 63 | 6f 76 65 72 20 74 68 65 |try to c|over the|
|00000a80| 20 67 61 6d 75 74 2c 20 | 73 6f 20 79 6f 75 20 73 | gamut, |so you s|
|00000a90| 68 6f 75 6c 64 20 75 73 | 65 20 0d 09 77 68 69 63 |hould us|e ..whic|
|00000aa0| 68 20 65 76 65 72 20 73 | 65 65 6d 73 20 61 70 70 |h ever s|eems app|
|00000ab0| 72 6f 70 72 69 61 74 65 | 2e 20 20 49 6e 20 6d 6f |ropriate|. In mo|
|00000ac0| 73 74 20 63 61 73 65 73 | 2c 20 75 73 65 20 74 68 |st cases|, use th|
|00000ad0| 65 20 73 69 6d 70 6c 65 | 73 74 0d 09 6f 6e 65 20 |e simple|st..one |
|00000ae0| 74 68 61 74 20 77 69 6c | 6c 20 67 69 76 65 20 74 |that wil|l give t|
|00000af0| 68 65 20 64 65 73 69 72 | 65 64 20 72 65 73 75 6c |he desir|ed resul|
|00000b00| 74 73 2e 20 20 54 68 65 | 20 63 6f 6d 70 61 74 69 |ts. The| compati|
|00000b10| 62 69 6c 69 74 79 0d 09 | 72 61 74 69 6e 67 20 69 |bility..|rating i|
|00000b20| 73 20 66 72 6f 6d 20 30 | 2e 2e 39 20 77 68 65 72 |s from 0|..9 wher|
|00000b30| 65 20 6c 6f 77 20 69 73 | 20 62 65 74 74 65 72 2e |e low is| better.|
|00000b40| 20 20 54 68 65 20 6d 6f | 72 65 20 6b 6e 6f 77 6e | The mo|re known|
|00000b50| 20 72 69 73 6b 73 20 0d | 09 74 68 65 72 65 20 61 | risks .|.there a|
|00000b60| 72 65 20 74 68 65 20 68 | 69 67 68 65 72 20 74 68 |re the h|igher th|
|00000b70| 65 20 72 61 74 69 6e 67 | 2e 0d 09 0d 09 0d 09 54 |e rating|.......T|
|00000b80| 68 65 20 70 72 6f 67 72 | 61 6d 73 20 28 69 6e 20 |he progr|ams (in |
|00000b90| 6f 72 64 65 72 20 6f 66 | 20 63 6f 6d 70 61 74 69 |order of| compati|
|00000ba0| 62 69 6c 69 74 79 29 3a | 0d 09 0d 09 09 53 69 6c |bility):|.....Sil|
|00000bb0| 6c 79 42 61 6c 6c 73 3a | 0d 09 09 09 54 68 69 73 |lyBalls:|....This|
|00000bc0| 20 69 73 20 74 68 65 20 | 73 69 6d 70 6c 65 73 74 | is the |simplest|
|00000bd0| 20 75 73 65 20 6f 66 20 | 43 6f 6c 6f 72 20 51 75 | use of |Color Qu|
|00000be0| 69 63 6b 44 72 61 77 2c | 20 61 6e 64 20 64 6f 65 |ickDraw,| and doe|
|00000bf0| 73 0d 09 09 09 6e 6f 74 | 20 75 73 65 20 74 68 65 |s....not| use the|
|00000c00| 20 50 61 6c 65 74 74 65 | 20 4d 61 6e 61 67 65 72 | Palette| Manager|
|00000c10| 2e 20 20 49 74 20 64 72 | 61 77 73 20 72 61 6e 64 |. It dr|aws rand|
|00000c20| 6f 6d 6c 79 20 63 6f 6c | 6f 72 65 64 0d 09 09 09 |omly col|ored....|
|00000c30| 62 61 6c 6c 73 20 69 6e | 20 61 20 63 6f 6c 6f 72 |balls in| a color|
|00000c40| 20 77 69 6e 64 6f 77 2e | 20 20 54 68 69 73 20 69 | window.| This i|
|00000c50| 73 20 69 6e 74 65 6e 64 | 65 64 20 74 6f 20 67 69 |s intend|ed to gi|
|00000c60| 76 65 20 79 6f 75 0d 09 | 09 09 74 68 65 20 61 62 |ve you..|..the ab|
|00000c70| 73 6f 6c 75 74 65 20 6d | 69 6e 69 6d 75 6d 20 72 |solute m|inimum r|
|00000c80| 65 71 75 69 72 65 64 20 | 74 6f 20 67 65 74 20 63 |equired |to get c|
|00000c90| 6f 6c 6f 72 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |olor on |the scre|
|00000ca0| 65 6e 2e 0d 09 09 09 57 | 72 69 74 74 65 6e 20 69 |en.....W|ritten i|
|00000cb0| 6e 20 73 74 72 61 69 67 | 68 74 20 50 61 73 63 61 |n straig|ht Pasca|
|00000cc0| 6c 20 63 6f 64 65 2e 0d | 09 09 09 43 6f 6d 70 61 |l code..|...Compa|
|00000cd0| 74 69 62 69 6c 69 74 79 | 20 72 61 74 69 6e 67 20 |tibility| rating |
|00000ce0| 3d 20 30 2c 20 6e 6f 20 | 6b 6e 6f 77 6e 20 72 69 |= 0, no |known ri|
|00000cf0| 73 6b 73 2e 0d 09 09 0d | 09 09 46 72 61 63 41 70 |sks.....|..FracAp|
|00000d00| 70 50 61 6c 65 74 74 65 | 3a 0d 09 09 09 54 68 69 |pPalette|:....Thi|
|00000d10| 73 20 69 73 20 61 20 76 | 65 72 73 69 6f 6e 20 6f |s is a v|ersion o|
|00000d20| 66 20 46 72 61 63 41 70 | 70 20 74 68 61 74 20 75 |f FracAp|p that u|
|00000d30| 73 65 73 20 6f 6e 6c 79 | 20 74 68 65 20 50 61 6c |ses only| the Pal|
|00000d40| 65 74 74 65 0d 09 09 09 | 4d 61 6e 61 67 65 72 2e |ette....|Manager.|
|00000d50| 20 20 49 74 20 64 6f 65 | 73 20 6e 6f 74 20 73 75 | It doe|s not su|
|00000d60| 70 70 6f 72 74 20 63 6f | 6c 6f 72 20 74 61 62 6c |pport co|lor tabl|
|00000d70| 65 20 61 6e 69 6d 61 74 | 69 6f 6e 0d 09 09 09 73 |e animat|ion....s|
|00000d80| 69 6e 63 65 20 74 68 61 | 74 20 70 61 72 74 20 6f |ince tha|t part o|
|00000d90| 66 20 74 68 65 20 50 61 | 6c 65 74 74 65 20 4d 61 |f the Pa|lette Ma|
|00000da0| 6e 61 67 65 72 20 69 73 | 20 6e 6f 74 20 73 75 66 |nager is| not suf|
|00000db0| 66 69 63 69 65 6e 74 2e | 0d 09 09 09 54 68 65 20 |ficient.|....The |
|00000dc0| 70 72 6f 67 72 61 6d 20 | 64 65 6d 6f 6e 73 74 72 |program |demonstr|
|00000dd0| 61 74 65 73 20 61 20 66 | 75 6c 6c 20 63 6f 6c 6f |ates a f|ull colo|
|00000de0| 72 20 70 61 6c 65 74 74 | 65 20 74 68 61 74 20 69 |r palett|e that i|
|00000df0| 73 0d 09 09 09 75 73 65 | 64 20 74 6f 20 64 69 73 |s....use|d to dis|
|00000e00| 70 6c 61 79 20 74 68 65 | 20 4d 61 6e 64 65 6c 62 |play the| Mandelb|
|00000e10| 72 6f 74 20 73 65 74 2e | 20 20 49 74 20 75 73 65 |rot set.| It use|
|00000e20| 73 20 61 6e 20 6f 66 66 | 73 63 72 65 65 6e 0d 09 |s an off|screen..|
|00000e30| 09 09 67 44 65 76 69 63 | 65 20 77 2f 20 50 6f 72 |..gDevic|e w/ Por|
|00000e40| 74 20 74 6f 20 68 61 6e | 64 6c 65 20 74 68 65 20 |t to han|dle the |
|00000e50| 64 61 74 61 2c 20 75 73 | 69 6e 67 20 43 6f 70 79 |data, us|ing Copy|
|00000e60| 42 69 74 73 20 74 6f 0d | 09 09 09 64 72 61 77 20 |Bits to.|...draw |
|00000e70| 74 6f 20 74 68 65 20 77 | 69 6e 64 6f 77 2e 20 20 |to the w|indow. |
|00000e80| 54 68 65 20 50 61 6c 65 | 74 74 65 20 69 73 20 61 |The Pale|tte is a|
|00000e90| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 0d 09 09 |utomatic|ally ...|
|00000ea0| 09 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00000eb0| 20 65 61 63 68 20 77 69 | 6e 64 6f 77 2e 20 20 54 | each wi|ndow. T|
|00000ec0| 68 65 20 50 49 43 54 20 | 66 69 6c 65 73 20 61 72 |he PICT |files ar|
|00000ed0| 65 20 72 65 61 64 0d 09 | 09 09 61 6e 64 20 77 72 |e read..|..and wr|
|00000ee0| 69 74 74 65 6e 20 75 73 | 69 6e 67 20 74 68 65 20 |itten us|ing the |
|00000ef0| 62 6f 74 74 6c 65 6e 65 | 63 6b 73 2c 20 74 6f 20 |bottlene|cks, to |
|00000f00| 73 61 76 65 20 6f 6e 20 | 6d 65 6d 6f 72 79 0d 09 |save on |memory..|
|00000f10| 09 09 75 73 65 61 67 65 | 2e 0d 09 09 09 57 72 69 |..useage|.....Wri|
|00000f20| 74 74 65 6e 20 69 6e 20 | 4d 61 63 41 70 70 20 4f |tten in |MacApp O|
|00000f30| 62 6a 65 63 74 20 50 61 | 73 63 61 6c 20 63 6f 64 |bject Pa|scal cod|
|00000f40| 65 2e 0d 09 09 09 43 6f | 6d 70 61 74 69 62 69 6c |e.....Co|mpatibil|
|00000f50| 69 74 79 20 72 61 74 69 | 6e 67 20 3d 20 30 2c 20 |ity rati|ng = 0, |
|00000f60| 6e 6f 20 6b 6e 6f 77 6e | 20 72 69 73 6b 73 2e 0d |no known| risks..|
|00000f70| 09 09 0d 09 09 54 75 62 | 65 54 65 73 74 3a 09 28 |.....Tub|eTest:.(|
|00000f80| 2a 2a 2a 29 0d 09 09 09 | 54 68 69 73 20 69 73 20 |***)....|This is |
|00000f90| 61 20 73 6d 61 6c 6c 20 | 64 65 6d 6f 20 70 72 6f |a small |demo pro|
|00000fa0| 67 72 61 6d 20 74 68 61 | 74 20 64 65 6d 6f 6e 73 |gram tha|t demons|
|00000fb0| 74 72 61 74 65 73 20 75 | 73 69 6e 67 20 74 68 65 |trates u|sing the|
|00000fc0| 0d 09 09 09 50 61 6c 65 | 74 74 65 20 4d 61 6e 61 |....Pale|tte Mana|
|00000fd0| 67 65 72 20 66 6f 72 20 | 63 6f 6c 6f 72 20 74 61 |ger for |color ta|
|00000fe0| 62 6c 65 20 61 6e 69 6d | 61 74 69 6f 6e 2e 20 20 |ble anim|ation. |
|00000ff0| 49 74 20 75 73 65 73 20 | 61 20 0d 09 09 09 63 6f |It uses |a ....co|
|00001000| 6c 6f 72 20 70 61 6c 65 | 74 74 65 20 77 69 74 68 |lor pale|tte with|
|00001010| 20 61 6e 69 6d 61 74 69 | 6e 67 20 65 6e 74 72 69 | animati|ng entri|
|00001020| 65 73 2c 20 61 6e 64 20 | 64 72 61 77 73 20 75 73 |es, and |draws us|
|00001030| 69 6e 67 20 74 68 65 0d | 09 09 09 50 61 6c 65 74 |ing the.|...Palet|
|00001040| 74 65 20 4d 61 6e 61 67 | 65 72 2e 20 20 54 68 65 |te Manag|er. The|
|00001050| 72 65 20 61 72 65 20 74 | 77 6f 20 63 69 72 63 6c |re are t|wo circl|
|00001060| 65 73 20 6f 66 20 61 6e | 69 6d 61 74 69 6e 67 20 |es of an|imating |
|00001070| 63 6f 6c 6f 72 73 0d 09 | 09 09 77 68 69 63 68 20 |colors..|..which |
|00001080| 67 69 76 65 73 20 61 20 | 66 6c 6f 77 69 6e 67 20 |gives a |flowing |
|00001090| 74 75 62 65 20 65 66 66 | 65 63 74 2e 20 20 54 68 |tube eff|ect. Th|
|000010a0| 69 73 20 69 73 20 61 20 | 76 61 6c 69 64 20 63 61 |is is a |valid ca|
|000010b0| 73 65 0d 09 09 09 66 6f | 72 20 75 73 69 6e 67 20 |se....fo|r using |
|000010c0| 74 68 65 20 61 6e 69 6d | 61 74 69 6e 67 20 63 6f |the anim|ating co|
|000010d0| 6c 6f 72 73 20 61 73 70 | 65 63 74 20 6f 66 20 74 |lors asp|ect of t|
|000010e0| 68 65 20 50 61 6c 65 74 | 74 65 20 4d 61 6e 61 67 |he Palet|te Manag|
|000010f0| 65 72 2c 0d 09 09 09 73 | 69 6e 63 65 20 74 68 65 |er,....s|ince the|
|00001100| 20 69 6d 61 67 65 20 69 | 73 20 62 65 69 6e 67 20 | image i|s being |
|00001110| 64 72 61 77 6e 20 64 69 | 72 65 63 74 6c 79 2e 0d |drawn di|rectly..|
|00001120| 09 09 09 57 72 69 74 74 | 65 6e 20 69 6e 20 73 74 |...Writt|en in st|
|00001130| 72 61 69 67 68 74 20 50 | 61 73 63 61 6c 20 63 6f |raight P|ascal co|
|00001140| 64 65 2e 0d 09 09 09 43 | 6f 6d 70 61 74 69 62 69 |de.....C|ompatibi|
|00001150| 6c 69 74 79 20 72 61 74 | 69 6e 67 20 3d 20 30 2c |lity rat|ing = 0,|
|00001160| 20 6e 6f 20 6b 6e 6f 77 | 6e 20 72 69 73 6b 73 2e | no know|n risks.|
|00001170| 0d 09 09 0d 09 09 46 72 | 61 63 41 70 70 3a 0d 09 |......Fr|acApp:..|
|00001180| 09 09 54 68 69 73 20 69 | 73 20 74 68 65 20 d4 63 |..This i|s the .c|
|00001190| 6f 6d 6d 65 72 63 69 61 | 6c 20 71 75 61 6c 69 74 |ommercia|l qualit|
|000011a0| 79 d5 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 46 72 |y. versi|on of Fr|
|000011b0| 61 63 41 70 70 2e 20 20 | 54 68 69 73 0d 09 09 09 |acApp. |This....|
|000011c0| 76 65 72 73 69 6f 6e 20 | 73 75 70 70 6f 72 74 73 |version |supports|
|000011d0| 20 63 6f 6c 6f 72 20 74 | 61 62 6c 65 20 61 6e 69 | color t|able ani|
|000011e0| 6d 61 74 69 6f 6e 2c 20 | 75 73 69 6e 67 20 61 6e |mation, |using an|
|000011f0| 20 6f 66 66 73 63 72 65 | 65 6e 0d 09 09 09 67 44 | offscre|en....gD|
|00001200| 65 76 69 63 65 20 77 2f | 20 50 6f 72 74 2c 20 61 |evice w/| Port, a|
|00001210| 6e 64 20 68 61 6e 64 6c | 65 73 20 6d 75 6c 74 69 |nd handl|es multi|
|00001220| 70 6c 65 20 64 6f 63 75 | 6d 65 6e 74 73 2e 20 20 |ple docu|ments. |
|00001230| 54 68 65 0d 09 09 09 43 | 6f 70 79 42 69 74 73 20 |The....C|opyBits |
|00001240| 75 70 64 61 74 65 73 20 | 74 6f 20 74 68 65 20 73 |updates |to the s|
|00001250| 63 72 65 65 6e 20 61 72 | 65 20 61 73 20 66 61 73 |creen ar|e as fas|
|00001260| 74 20 61 73 20 70 6f 73 | 73 69 62 6c 65 2e 20 20 |t as pos|sible. |
|00001270| 54 68 65 0d 09 09 09 70 | 72 6f 67 72 61 6d 20 64 |The....p|rogram d|
|00001280| 6f 65 73 20 6e 6f 74 20 | 75 73 65 20 74 68 65 20 |oes not |use the |
|00001290| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 2c |Palette |Manager,|
|000012a0| 20 65 78 63 65 70 74 20 | 74 6f 0d 09 09 09 70 72 | except |to....pr|
|000012b0| 6f 76 69 64 65 20 66 6f | 72 20 74 68 65 20 73 79 |ovide fo|r the sy|
|000012c0| 73 74 65 6d 20 70 61 6c | 65 74 74 65 2c 20 6f 72 |stem pal|ette, or|
|000012d0| 20 63 6f 6c 6f 72 20 6d | 6f 64 65 73 20 77 69 74 | color m|odes wit|
|000012e0| 68 20 6c 65 73 73 20 74 | 68 61 6e 0d 09 09 09 32 |h less t|han....2|
|000012f0| 35 35 20 63 6f 6c 6f 72 | 73 2e 20 20 46 6f 72 20 |55 color|s. For |
|00001300| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 20 61 6e 69 6d |color ta|ble anim|
|00001310| 61 74 69 6f 6e 20 75 73 | 69 6e 67 20 61 6e 20 6f |ation us|ing an o|
|00001320| 66 66 73 63 72 65 65 6e | 0d 09 09 09 67 44 65 76 |ffscreen|....gDev|
|00001330| 69 63 65 20 77 2f 20 50 | 6f 72 74 2c 20 69 74 20 |ice w/ P|ort, it |
|00001340| 75 73 65 73 20 74 68 65 | 20 43 6f 6c 6f 72 20 4d |uses the| Color M|
|00001350| 61 6e 61 67 65 72 20 61 | 6e 64 20 68 61 6e 64 6c |anager a|nd handl|
|00001360| 65 73 20 74 68 65 0d 09 | 09 09 63 6f 6c 6f 72 73 |es the..|..colors|
|00001370| 20 69 74 73 65 6c 66 2e | 20 20 53 74 72 69 63 74 | itself.| Strict|
|00001380| 20 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 79 20 77 | compati|bility w|
|00001390| 61 73 20 72 65 6c 61 78 | 65 64 20 74 6f 20 61 6c |as relax|ed to al|
|000013a0| 6c 6f 77 20 66 6f 72 0d | 09 09 09 61 20 68 69 67 |low for.|...a hig|
|000013b0| 68 65 72 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 20 |her perf|ormance |
|000013c0| 70 72 6f 67 72 61 6d 2e | 20 20 54 68 69 73 20 69 |program.| This i|
|000013d0| 73 20 74 68 65 20 6d 6f | 73 74 20 d4 72 65 61 6c |s the mo|st .real|
|000013e0| d5 20 6f 66 20 74 68 65 | 0d 09 09 09 73 61 6d 70 |. of the|....samp|
|000013f0| 6c 65 20 70 72 6f 67 72 | 61 6d 73 2e 0d 09 09 09 |le progr|ams.....|
|00001400| 57 72 69 74 74 65 6e 20 | 69 6e 20 4d 61 63 41 70 |Written |in MacAp|
|00001410| 70 20 4f 62 6a 65 63 74 | 20 50 61 73 63 61 6c 20 |p Object| Pascal |
|00001420| 63 6f 64 65 2e 0d 09 09 | 09 43 6f 6d 70 61 74 69 |code....|.Compati|
|00001430| 62 69 6c 69 74 79 20 72 | 61 74 69 6e 67 20 3d 20 |bility r|ating = |
|00001440| 32 2e 20 20 28 6e 6f 74 | 68 69 6e 67 20 77 69 6c |2. (not|hing wil|
|00001450| 6c 20 62 72 65 61 6b 2c | 20 62 75 74 20 69 74 20 |l break,| but it |
|00001460| 6d 61 79 20 6e 6f 74 0d | 09 09 09 61 6c 77 61 79 |may not.|...alway|
|00001470| 73 20 6c 6f 6f 6b 20 63 | 6f 72 72 65 63 74 2e 29 |s look c|orrect.)|
|00001480| 0d 09 09 0d 09 09 46 72 | 61 63 41 70 70 33 30 30 |......Fr|acApp300|
|00001490| 3a 0d 09 09 09 54 68 69 | 73 20 64 6f 65 73 6e 27 |:....Thi|s doesn'|
|000014a0| 74 20 73 75 70 70 6f 72 | 74 20 63 6f 6c 6f 72 73 |t suppor|t colors|
|000014b0| 2c 20 62 75 74 20 64 65 | 6d 6f 6e 73 74 72 61 74 |, but de|monstrat|
|000014c0| 65 73 20 68 6f 77 20 74 | 6f 20 63 72 65 61 74 65 |es how t|o create|
|000014d0| 20 61 6e 64 0d 09 09 09 | 75 73 65 20 61 20 33 30 | and....|use a 30|
|000014e0| 30 20 64 70 69 20 62 69 | 74 6d 61 70 20 77 2f 20 |0 dpi bi|tmap w/ |
|000014f0| 50 6f 72 74 2e 20 20 54 | 68 65 20 62 69 74 6d 61 |Port. T|he bitma|
|00001500| 70 20 69 73 20 70 72 69 | 6e 74 65 64 20 61 74 20 |p is pri|nted at |
|00001510| 66 75 6c 6c 0d 09 09 09 | 72 65 73 6f 6c 75 74 69 |full....|resoluti|
|00001520| 6f 6e 20 6f 6e 20 4c 61 | 73 65 72 57 72 69 74 65 |on on La|serWrite|
|00001530| 72 73 2c 20 61 6e 64 20 | 63 6c 69 70 70 65 64 20 |rs, and |clipped |
|00001540| 6f 6e 20 6f 74 68 65 72 | 20 70 72 69 6e 74 65 72 |on other| printer|
|00001550| 73 20 28 62 75 74 0d 09 | 09 09 74 68 65 79 20 73 |s (but..|..they s|
|00001560| 74 69 6c 6c 20 70 72 69 | 6e 74 29 2e 20 20 49 74 |till pri|nt). It|
|00001570| 20 64 65 6d 6f 6e 73 74 | 72 61 74 65 73 20 68 6f | demonst|rates ho|
|00001580| 77 20 74 6f 20 75 73 65 | 20 61 20 68 69 67 68 20 |w to use| a high |
|00001590| 72 65 73 6f 6c 75 74 69 | 6f 6e 0d 09 09 09 69 6d |resoluti|on....im|
|000015a0| 61 67 65 20 61 73 20 61 | 20 50 49 43 54 20 66 69 |age as a| PICT fi|
|000015b0| 6c 65 2c 20 61 6e 64 20 | 68 6f 77 20 74 6f 20 70 |le, and |how to p|
|000015c0| 72 69 6e 74 20 74 68 65 | 6d 20 6f 75 74 2e 0d 09 |rint the|m out...|
|000015d0| 09 09 57 72 69 74 74 65 | 6e 20 69 6e 20 4d 61 63 |..Writte|n in Mac|
|000015e0| 41 70 70 20 4f 62 6a 65 | 63 74 20 50 61 73 63 61 |App Obje|ct Pasca|
|000015f0| 6c 20 63 6f 64 65 2e 0d | 09 09 09 43 6f 6d 70 61 |l code..|...Compa|
|00001600| 74 69 62 69 6c 69 74 79 | 20 72 61 74 69 6e 67 20 |tibility| rating |
|00001610| 3d 20 31 2e 20 20 28 54 | 68 65 20 75 73 65 20 6f |= 1. (T|he use o|
|00001620| 66 20 50 72 47 65 6e 65 | 72 61 6c 20 69 73 20 73 |f PrGene|ral is s|
|00001630| 6c 69 67 68 74 6c 79 20 | 0d 09 09 09 6f 75 74 20 |lightly |....out |
|00001640| 6f 66 20 74 68 65 20 6f | 72 64 69 6e 61 72 79 2c |of the o|rdinary,|
|00001650| 20 61 6c 74 68 6f 75 67 | 68 20 73 75 70 70 6f 72 | althoug|h suppor|
|00001660| 74 65 64 2e 29 0d 7d 0d | 0d 20 7b 24 52 2d 7d 09 |ted.).}.|. {$R-}.|
|00001670| 7b 20 4e 6f 20 72 61 6e | 67 65 20 63 68 65 63 6b |{ No ran|ge check|
|00001680| 69 6e 67 2e 7d 0d 20 7b | 24 44 2b 7d 09 7b 20 44 |ing.}. {|$D+}.{ D|
|00001690| 65 62 75 67 67 69 6e 67 | 20 6c 61 62 65 6c 73 20 |ebugging| labels |
|000016a0| 6f 6e 2e 20 7d 0d 20 0d | 20 0d 09 7b 20 49 6e 74 |on. }. .| ..{ Int|
|000016b0| 65 72 66 61 63 65 20 66 | 69 6c 65 73 20 77 69 74 |erface f|iles wit|
|000016c0| 68 20 61 6c 6c 20 74 68 | 65 20 68 61 70 70 79 20 |h all th|e happy |
|000016d0| 4d 61 63 69 6e 74 6f 73 | 68 20 73 74 75 66 66 20 |Macintos|h stuff |
|000016e0| 69 6e 20 74 68 65 6d 2e | 20 7d 0d 55 53 45 53 20 |in them.| }.USES |
|000016f0| 0d 09 4d 65 6d 54 79 70 | 65 73 2c 20 51 75 69 63 |..MemTyp|es, Quic|
|00001700| 6b 44 72 61 77 2c 20 4f | 73 49 6e 74 66 2c 20 54 |kDraw, O|sIntf, T|
|00001710| 6f 6f 6c 49 6e 74 66 2c | 20 50 61 6c 65 74 74 65 |oolIntf,| Palette|
|00001720| 4d 67 72 3b 0d 09 0d 09 | 0d 43 4f 4e 53 54 0d 09 |Mgr;....|.CONST..|
|00001730| 61 70 70 6c 65 49 44 09 | 09 09 09 09 3d 20 31 30 |appleID.|....= 10|
|00001740| 30 30 3b 09 09 7b 20 72 | 65 73 6f 75 72 63 65 20 |00;..{ r|esource |
|00001750| 49 44 73 2f 6d 65 6e 75 | 20 49 44 73 20 66 6f 72 |IDs/menu| IDs for|
|00001760| 20 41 70 70 6c 65 2c 20 | 46 69 6c 65 20 61 6e 64 | Apple, |File and|
|00001770| 20 45 64 69 74 20 6d 65 | 6e 75 73 20 7d 0d 09 66 | Edit me|nus }..f|
|00001780| 69 6c 65 49 44 09 09 09 | 09 09 3d 20 31 30 30 31 |ileID...|..= 1001|
|00001790| 3b 0d 09 65 64 69 74 49 | 44 09 09 09 09 09 3d 20 |;..editI|D.....= |
|000017a0| 31 30 30 32 3b 0d 09 0d | 09 61 70 70 6c 65 4d 09 |1002;...|.appleM.|
|000017b0| 09 09 09 09 3d 20 31 3b | 09 09 7b 20 49 6e 64 65 |....= 1;|..{ Inde|
|000017c0| 78 20 66 6f 72 20 65 61 | 63 68 20 6d 65 6e 75 20 |x for ea|ch menu |
|000017d0| 69 6e 20 6d 79 4d 65 6e | 75 73 20 28 61 72 72 61 |in myMen|us (arra|
|000017e0| 79 20 6f 66 20 6d 65 6e | 75 20 68 61 6e 64 6c 65 |y of men|u handle|
|000017f0| 73 29 20 7d 0d 09 66 69 | 6c 65 4d 09 09 09 09 09 |s) }..fi|leM.....|
|00001800| 3d 20 32 3b 0d 09 65 64 | 69 74 4d 09 09 09 09 09 |= 2;..ed|itM.....|
|00001810| 3d 20 33 3b 0d 0d 09 6d | 65 6e 75 43 6f 75 6e 74 |= 3;...m|enuCount|
|00001820| 09 09 09 09 3d 20 33 3b | 09 09 7b 20 54 6f 74 61 |....= 3;|..{ Tota|
|00001830| 6c 20 6e 75 6d 62 65 72 | 20 6f 66 20 6d 65 6e 75 |l number| of menu|
|00001840| 73 20 7d 0d 0d 09 77 69 | 6e 64 6f 77 49 44 09 09 |s }...wi|ndowID..|
|00001850| 09 09 3d 20 31 30 30 30 | 3b 09 09 7b 20 52 65 73 |..= 1000|;..{ Res|
|00001860| 6f 75 72 63 65 20 49 44 | 20 66 6f 72 20 6d 61 69 |ource ID| for mai|
|00001870| 6e 20 77 69 6e 64 6f 77 | 20 7d 0d 09 61 62 6f 75 |n window| }..abou|
|00001880| 74 4d 65 44 4c 4f 47 20 | 09 09 09 3d 20 31 30 30 |tMeDLOG |...= 100|
|00001890| 30 3b 09 09 7b 20 41 6e | 64 20 52 65 73 6f 75 72 |0;..{ An|d Resour|
|000018a0| 63 65 20 49 44 20 66 6f | 72 20 41 62 6f 75 74 20 |ce ID fo|r About |
|000018b0| 62 6f 78 20 64 69 61 6c | 6f 67 2e 20 7d 0d 0d 09 |box dial|og. }...|
|000018c0| 74 75 62 75 6c 61 72 49 | 74 65 6d 09 09 09 09 3d |tubularI|tem....=|
|000018d0| 20 31 3b 09 09 7b 20 57 | 68 65 6e 20 63 68 65 63 | 1;..{ W|hen chec|
|000018e0| 6b 65 64 2c 20 61 6e 69 | 6d 61 74 69 6f 6e 20 6f |ked, ani|mation o|
|000018f0| 66 20 63 6f 6c 6f 72 73 | 2e 20 7d 0d 09 71 75 69 |f colors|. }..qui|
|00001900| 74 49 74 65 6d 09 09 09 | 09 3d 20 33 3b 09 09 7b |tItem...|.= 3;..{|
|00001910| 20 51 75 69 74 20 69 6e | 20 74 68 65 20 6d 65 6e | Quit in| the men|
|00001920| 75 20 6f 66 20 63 6f 75 | 72 73 65 2e 20 7d 0d 0d |u of cou|rse. }..|
|00001930| 09 61 62 6f 75 74 4d 65 | 43 6f 6d 6d 61 6e 64 09 |.aboutMe|Command.|
|00001940| 09 09 3d 20 31 3b 09 09 | 7b 20 4d 65 6e 75 20 69 |..= 1;..|{ Menu i|
|00001950| 74 65 6d 20 69 6e 20 61 | 70 70 6c 65 20 6d 65 6e |tem in a|pple men|
|00001960| 75 20 66 6f 72 20 41 62 | 6f 75 74 20 54 75 62 65 |u for Ab|out Tube|
|00001970| 54 65 73 74 20 69 74 65 | 6d 20 7d 0d 09 0d 09 74 |Test ite|m }....t|
|00001980| 6f 74 61 6c 43 6f 6c 6f | 72 73 09 09 09 09 3d 20 |otalColo|rs....= |
|00001990| 31 35 32 3b 09 09 7b 20 | 75 73 65 20 31 35 30 20 |152;..{ |use 150 |
|000019a0| 63 6f 6c 6f 72 73 20 69 | 6e 20 6f 75 72 20 70 61 |colors i|n our pa|
|000019b0| 6c 65 74 74 65 20 66 6f | 72 20 64 72 61 77 69 6e |lette fo|r drawin|
|000019c0| 67 20 65 79 65 73 2e 20 | 7d 0d 09 6e 75 6d 43 6f |g eyes. |}..numCo|
|000019d0| 6c 6f 72 73 09 09 09 09 | 3d 20 31 35 30 3b 09 09 |lors....|= 150;..|
|000019e0| 7b 20 74 6f 20 73 6b 69 | 70 20 62 6c 61 63 6b 20 |{ to ski|p black |
|000019f0| 61 6e 64 20 77 68 69 74 | 65 2e 20 7d 0d 09 0d 09 |and whit|e. }....|
|00001a00| 0d 20 0d 56 41 52 0d 09 | 6d 79 4d 65 6e 75 73 3a |. .VAR..|myMenus:|
|00001a10| 09 09 41 52 52 41 59 20 | 5b 31 2e 2e 6d 65 6e 75 |..ARRAY |[1..menu|
|00001a20| 43 6f 75 6e 74 5d 20 4f | 46 20 4d 65 6e 75 48 61 |Count] O|F MenuHa|
|00001a30| 6e 64 6c 65 3b 0d 09 64 | 72 61 67 52 65 63 74 3a |ndle;..d|ragRect:|
|00001a40| 09 09 52 65 63 74 3b 09 | 09 09 09 7b 20 52 65 63 |..Rect;.|...{ Rec|
|00001a50| 74 61 6e 67 6c 65 20 75 | 73 65 64 20 74 6f 20 6d |tangle u|sed to m|
|00001a60| 61 72 6b 20 62 6f 75 6e | 64 73 20 66 6f 72 20 64 |ark boun|ds for d|
|00001a70| 72 61 67 67 69 6e 67 20 | 77 69 6e 64 6f 77 20 7d |ragging |window }|
|00001a80| 0d 09 64 6f 6e 65 46 6c | 61 67 3a 09 09 42 4f 4f |..doneFl|ag:..BOO|
|00001a90| 4c 45 41 4e 3b 09 09 09 | 7b 20 54 52 55 45 20 69 |LEAN;...|{ TRUE i|
|00001aa0| 66 20 75 73 65 72 20 68 | 61 73 20 63 68 6f 73 65 |f user h|as chose|
|00001ab0| 6e 20 51 75 69 74 20 63 | 6f 6d 6d 61 6e 64 20 7d |n Quit c|ommand }|
|00001ac0| 0d 09 6d 79 45 76 65 6e | 74 3a 09 09 45 76 65 6e |..myEven|t:..Even|
|00001ad0| 74 52 65 63 6f 72 64 3b | 0d 09 6d 79 57 69 6e 64 |tRecord;|..myWind|
|00001ae0| 6f 77 3a 09 09 57 69 6e | 64 6f 77 50 74 72 3b 0d |ow:..Win|dowPtr;.|
|00001af0| 09 77 68 69 63 68 57 69 | 6e 64 6f 77 3a 09 57 69 |.whichWi|ndow:.Wi|
|00001b00| 6e 64 6f 77 50 74 72 3b | 0d 09 74 75 62 65 43 68 |ndowPtr;|..tubeCh|
|00001b10| 65 63 6b 3a 09 09 42 6f | 6f 6c 65 61 6e 3b 09 09 |eck:..Bo|olean;..|
|00001b20| 09 7b 20 69 66 20 74 72 | 75 65 2c 20 74 68 65 20 |.{ if tr|ue, the |
|00001b30| 6d 65 6e 75 20 69 73 20 | 63 68 65 63 6b 65 64 2c |menu is |checked,|
|00001b40| 20 61 6e 64 20 77 65 20 | 61 6e 69 6d 61 74 65 2e | and we |animate.|
|00001b50| 20 7d 0d 09 74 68 65 43 | 68 61 72 3a 09 09 43 68 | }..theC|har:..Ch|
|00001b60| 61 72 3b 0d 09 65 72 72 | 6f 72 3a 20 09 09 09 4f |ar;..err|or: ...O|
|00001b70| 53 45 72 72 3b 0d 09 74 | 68 65 57 6f 72 6c 64 3a |SErr;..t|heWorld:|
|00001b80| 20 09 09 53 79 73 45 6e | 76 52 65 63 3b 0d 09 0d | ..SysEn|vRec;...|
|00001b90| 09 7b 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |.{ This |routine |
|00001ba0| 77 69 6c 6c 20 75 70 64 | 61 74 65 20 74 68 65 20 |will upd|ate the |
|00001bb0| 77 69 6e 64 6f 77 20 77 | 68 65 6e 20 72 65 71 75 |window w|hen requ|
|00001bc0| 69 72 65 64 20 62 79 20 | 75 70 64 61 74 65 20 65 |ired by |update e|
|00001bd0| 76 65 6e 74 73 2e 09 49 | 74 0d 09 09 77 69 6c 6c |vents..I|t...will|
|00001be0| 20 64 72 61 77 20 74 77 | 6f 20 63 69 72 63 75 6c | draw tw|o circul|
|00001bf0| 61 72 20 64 75 64 65 73 | 20 74 68 61 74 20 61 72 |ar dudes| that ar|
|00001c00| 65 20 69 6e 64 65 78 65 | 64 20 69 6e 20 63 6f 6c |e indexe|d in col|
|00001c10| 6f 72 73 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |ors thro|ugh the |
|00001c20| 63 6f 6c 6f 72 73 0d 09 | 09 77 65 20 61 72 65 20 |colors..|.we are |
|00001c30| 75 73 69 6e 67 2e 20 30 | 20 61 6e 64 20 31 20 61 |using. 0| and 1 a|
|00001c40| 72 65 20 73 6b 69 70 70 | 65 64 2c 20 73 69 6e 63 |re skipp|ed, sinc|
|00001c50| 65 20 74 68 6f 73 65 20 | 61 72 65 20 77 68 69 74 |e those |are whit|
|00001c60| 65 20 61 6e 64 20 62 6c | 61 63 6b 20 69 6e 20 74 |e and bl|ack in t|
|00001c70| 68 65 0d 09 09 70 61 6c | 65 74 74 65 2e 20 7d 0d |he...pal|ette. }.|
|00001c80| 50 52 4f 43 45 44 55 52 | 45 20 44 72 61 77 45 79 |PROCEDUR|E DrawEy|
|00001c90| 65 73 3b 0d 09 0d 09 56 | 41 52 09 09 54 65 6d 70 |es;....V|AR..Temp|
|00001ca0| 52 65 63 74 3a 09 52 65 | 63 74 3b 0d 09 09 09 49 |Rect:.Re|ct;....I|
|00001cb0| 3a 09 09 09 49 6e 74 65 | 67 65 72 3b 0d 09 0d 42 |:...Inte|ger;...B|
|00001cc0| 45 47 49 4e 0d 09 53 65 | 74 52 65 63 74 28 54 65 |EGIN..Se|tRect(Te|
|00001cd0| 6d 70 52 65 63 74 2c 20 | 6e 75 6d 43 6f 6c 6f 72 |mpRect, |numColor|
|00001ce0| 73 2c 20 6e 75 6d 43 6f | 6c 6f 72 73 2c 20 6e 75 |s, numCo|lors, nu|
|00001cf0| 6d 43 6f 6c 6f 72 73 2c | 20 6e 75 6d 43 6f 6c 6f |mColors,| numColo|
|00001d00| 72 73 29 3b 0d 09 46 6f | 72 20 49 20 3a 3d 20 32 |rs);..Fo|r I := 2|
|00001d10| 20 54 6f 20 74 6f 74 61 | 6c 43 6f 6c 6f 72 73 20 | To tota|lColors |
|00001d20| 44 6f 20 42 65 67 69 6e | 0d 09 09 50 6d 46 6f 72 |Do Begin|...PmFor|
|00001d30| 65 43 6f 6c 6f 72 28 49 | 29 3b 0d 09 09 46 72 61 |eColor(I|);...Fra|
|00001d40| 6d 65 4f 76 61 6c 20 28 | 54 65 6d 70 52 65 63 74 |meOval (|TempRect|
|00001d50| 29 3b 0d 09 09 49 6e 73 | 65 74 52 65 63 74 20 28 |);...Ins|etRect (|
|00001d60| 54 65 6d 70 52 65 63 74 | 2c 20 2d 31 2c 20 2d 31 |TempRect|, -1, -1|
|00001d70| 29 3b 0d 09 45 4e 44 3b | 0d 09 0d 09 53 65 74 52 |);..END;|....SetR|
|00001d80| 65 63 74 28 54 65 6d 70 | 52 65 63 74 2c 20 6e 75 |ect(Temp|Rect, nu|
|00001d90| 6d 43 6f 6c 6f 72 73 2a | 33 2c 20 6e 75 6d 43 6f |mColors*|3, numCo|
|00001da0| 6c 6f 72 73 2c 20 6e 75 | 6d 43 6f 6c 6f 72 73 2a |lors, nu|mColors*|
|00001db0| 33 2c 20 6e 75 6d 43 6f | 6c 6f 72 73 29 3b 0d 09 |3, numCo|lors);..|
|00001dc0| 46 6f 72 20 49 20 3a 3d | 20 74 6f 74 61 6c 43 6f |For I :=| totalCo|
|00001dd0| 6c 6f 72 73 20 44 6f 77 | 6e 54 6f 20 32 20 44 6f |lors Dow|nTo 2 Do|
|00001de0| 20 42 65 67 69 6e 0d 09 | 09 50 6d 46 6f 72 65 43 | Begin..|.PmForeC|
|00001df0| 6f 6c 6f 72 28 49 29 3b | 0d 09 09 46 72 61 6d 65 |olor(I);|...Frame|
|00001e00| 4f 76 61 6c 20 28 54 65 | 6d 70 52 65 63 74 29 3b |Oval (Te|mpRect);|
|00001e10| 0d 09 09 49 6e 73 65 74 | 52 65 63 74 20 28 54 65 |...Inset|Rect (Te|
|00001e20| 6d 70 52 65 63 74 2c 20 | 2d 31 2c 20 2d 31 29 3b |mpRect, |-1, -1);|
|00001e30| 0d 09 45 4e 44 3b 0d 45 | 4e 44 3b 09 7b 20 44 72 |..END;.E|ND;.{ Dr|
|00001e40| 61 77 45 79 65 73 20 7d | 0d 0d 0d 50 52 4f 43 45 |awEyes }|...PROCE|
|00001e50| 44 55 52 45 20 53 65 74 | 55 70 4d 65 6e 75 73 3b |DURE Set|UpMenus;|
|00001e60| 0d 0d 09 56 41 52 09 09 | 49 3a 09 49 4e 54 45 47 |...VAR..|I:.INTEG|
|00001e70| 45 52 3b 0d 0d 42 45 47 | 49 4e 0d 09 7b 20 52 65 |ER;..BEG|IN..{ Re|
|00001e80| 61 64 20 6d 65 6e 75 20 | 64 65 73 63 72 69 70 74 |ad menu |descript|
|00001e90| 69 6f 6e 73 20 66 72 6f | 6d 20 72 65 73 6f 75 72 |ions fro|m resour|
|00001ea0| 63 65 20 66 69 6c 65 20 | 69 6e 74 6f 20 6d 65 6d |ce file |into mem|
|00001eb0| 6f 72 79 20 61 6e 64 20 | 73 74 6f 72 65 20 68 61 |ory and |store ha|
|00001ec0| 6e 64 6c 65 73 0d 09 69 | 6e 20 6d 79 4d 65 6e 75 |ndles..i|n myMenu|
|00001ed0| 73 20 61 72 72 61 79 20 | 7d 0d 09 6d 79 4d 65 6e |s array |}..myMen|
|00001ee0| 75 73 5b 61 70 70 6c 65 | 4d 5d 20 3a 3d 20 47 65 |us[apple|M] := Ge|
|00001ef0| 74 4d 65 6e 75 28 61 70 | 70 6c 65 49 44 29 3b 09 |tMenu(ap|pleID);.|
|00001f00| 7b 72 65 61 64 20 41 70 | 70 6c 65 20 6d 65 6e 75 |{read Ap|ple menu|
|00001f10| 20 66 72 6f 6d 20 72 65 | 73 6f 75 72 63 65 20 66 | from re|source f|
|00001f20| 69 6c 65 7d 0d 09 41 64 | 64 52 65 73 4d 65 6e 75 |ile}..Ad|dResMenu|
|00001f30| 28 6d 79 4d 65 6e 75 73 | 5b 61 70 70 6c 65 4d 5d |(myMenus|[appleM]|
|00001f40| 2c 20 27 44 52 56 52 27 | 29 3b 09 7b 61 64 64 20 |, 'DRVR'|);.{add |
|00001f50| 64 65 73 6b 20 61 63 63 | 65 73 73 6f 72 79 20 6e |desk acc|essory n|
|00001f60| 61 6d 65 73 20 74 6f 20 | 41 70 70 6c 65 20 6d 65 |ames to |Apple me|
|00001f70| 6e 75 7d 0d 09 6d 79 4d | 65 6e 75 73 5b 66 69 6c |nu}..myM|enus[fil|
|00001f80| 65 4d 5d 20 3a 3d 20 47 | 65 74 4d 65 6e 75 28 66 |eM] := G|etMenu(f|
|00001f90| 69 6c 65 49 44 29 3b 09 | 09 7b 72 65 61 64 20 66 |ileID);.|.{read f|
|00001fa0| 69 6c 65 20 6d 65 6e 75 | 20 66 72 6f 6d 20 72 65 |ile menu| from re|
|00001fb0| 73 6f 75 72 63 65 20 66 | 69 6c 65 7d 0d 09 6d 79 |source f|ile}..my|
|00001fc0| 4d 65 6e 75 73 5b 65 64 | 69 74 4d 5d 20 3a 3d 20 |Menus[ed|itM] := |
|00001fd0| 47 65 74 4d 65 6e 75 28 | 65 64 69 74 49 44 29 3b |GetMenu(|editID);|
|00001fe0| 09 09 7b 72 65 61 64 20 | 65 64 69 74 20 6d 65 6e |..{read |edit men|
|00001ff0| 75 20 66 72 6f 6d 20 72 | 65 73 6f 75 72 63 65 20 |u from r|esource |
|00002000| 66 69 6c 65 7d 0d 0d 09 | 46 4f 52 20 49 20 3a 3d |file}...|FOR I :=|
|00002010| 20 31 20 54 4f 20 6d 65 | 6e 75 43 6f 75 6e 74 20 | 1 TO me|nuCount |
|00002020| 44 4f 20 49 6e 73 65 72 | 74 4d 65 6e 75 28 6d 79 |DO Inser|tMenu(my|
|00002030| 4d 65 6e 75 73 5b 49 5d | 2c 20 30 29 3b 20 7b 69 |Menus[I]|, 0); {i|
|00002040| 6e 73 74 61 6c 6c 20 6d | 65 6e 75 73 20 69 6e 20 |nstall m|enus in |
|00002050| 6d 65 6e 75 20 62 61 72 | 7d 0d 09 0d 09 44 72 61 |menu bar|}....Dra|
|00002060| 77 4d 65 6e 75 42 61 72 | 3b 09 09 09 09 09 09 09 |wMenuBar|;.......|
|00002070| 7b 61 6e 64 20 64 72 61 | 77 20 6d 65 6e 75 20 62 |{and dra|w menu b|
|00002080| 61 72 7d 0d 45 4e 44 3b | 20 7b 20 53 65 74 55 70 |ar}.END;| { SetUp|
|00002090| 4d 65 6e 75 73 20 7d 0d | 0d 0d 09 7b 20 55 73 65 |Menus }.|...{ Use|
|000020a0| 20 74 68 65 20 50 61 6c | 65 74 74 65 20 63 75 72 | the Pal|ette cur|
|000020b0| 72 65 6e 74 6c 79 20 61 | 74 74 61 63 68 65 64 20 |rently a|ttached |
|000020c0| 74 6f 20 74 68 65 20 6d | 61 69 6e 20 77 69 6e 64 |to the m|ain wind|
|000020d0| 6f 77 20 74 6f 20 61 6e | 69 6d 61 74 65 20 74 68 |ow to an|imate th|
|000020e0| 65 20 63 6f 6c 6f 72 73 | 20 0d 09 69 6e 20 74 68 |e colors| ..in th|
|000020f0| 65 20 63 69 72 63 75 6c | 61 72 20 65 79 65 20 73 |e circul|ar eye s|
|00002100| 68 61 70 65 73 2e 20 20 | 54 68 69 73 20 77 69 6c |hapes. |This wil|
|00002110| 6c 20 72 6f 74 61 74 65 | 20 74 68 65 6d 20 61 72 |l rotate| them ar|
|00002120| 6f 75 6e 64 20 74 6f 20 | 67 69 76 65 20 74 68 65 |ound to |give the|
|00002130| 20 66 6c 6f 77 69 6e 67 | 20 0d 09 74 75 62 65 20 | flowing| ..tube |
|00002140| 65 66 66 65 63 74 2e 20 | 57 65 20 6d 61 6b 65 20 |effect. |We make |
|00002150| 74 68 65 20 70 61 6c 65 | 74 74 65 20 69 6e 74 6f |the pale|tte into|
|00002160| 20 61 20 63 6f 6c 6f 72 | 20 74 61 62 6c 65 20 73 | a color| table s|
|00002170| 6f 20 77 65 20 63 61 6e | 20 6d 6f 76 65 20 65 6e |o we can| move en|
|00002180| 74 72 69 65 73 20 0d 09 | 61 72 6f 75 6e 64 2e 09 |tries ..|around..|
|00002190| 57 65 20 68 61 76 65 20 | 74 6f 20 73 6b 69 70 20 |We have |to skip |
|000021a0| 74 68 65 20 66 69 72 73 | 74 20 74 77 6f 20 65 6e |the firs|t two en|
|000021b0| 74 72 69 65 73 20 73 69 | 6e 63 65 20 74 68 6f 73 |tries si|nce thos|
|000021c0| 65 20 61 72 65 20 62 6c | 61 63 6b 20 61 6e 64 20 |e are bl|ack and |
|000021d0| 77 68 69 74 65 2e 20 0d | 09 28 65 6e 74 72 69 65 |white. .|.(entrie|
|000021e0| 73 20 30 20 61 6e 64 20 | 31 29 20 7d 0d 50 52 4f |s 0 and |1) }.PRO|
|000021f0| 43 45 44 55 52 45 20 53 | 68 69 66 74 79 43 6f 6c |CEDURE S|hiftyCol|
|00002200| 6f 72 73 3b 0d 09 0d 09 | 56 41 52 09 09 63 75 72 |ors;....|VAR..cur|
|00002210| 72 50 61 6c 65 74 74 65 | 3a 09 50 61 6c 65 74 74 |rPalette|:.Palett|
|00002220| 65 48 61 6e 64 6c 65 3b | 0d 09 09 09 64 65 73 74 |eHandle;|....dest|
|00002230| 43 54 61 62 3a 09 09 43 | 54 61 62 48 61 6e 64 6c |CTab:..C|TabHandl|
|00002240| 65 3b 0d 09 09 09 6c 61 | 73 74 43 53 70 65 63 3a |e;....la|stCSpec:|
|00002250| 09 09 43 6f 6c 6f 72 53 | 70 65 63 3b 0d 09 0d 42 |..ColorS|pec;...B|
|00002260| 45 47 49 4e 0d 09 53 65 | 74 50 6f 72 74 20 28 6d |EGIN..Se|tPort (m|
|00002270| 79 57 69 6e 64 6f 77 29 | 3b 0d 09 0d 09 63 75 72 |yWindow)|;....cur|
|00002280| 72 50 61 6c 65 74 74 65 | 20 3a 3d 20 47 65 74 50 |rPalette| := GetP|
|00002290| 61 6c 65 74 74 65 28 6d | 79 57 69 6e 64 6f 77 29 |alette(m|yWindow)|
|000022a0| 3b 0d 09 64 65 73 74 43 | 54 61 62 20 3a 3d 20 43 |;..destC|Tab := C|
|000022b0| 54 61 62 48 61 6e 64 6c | 65 20 28 4e 65 77 48 61 |TabHandl|e (NewHa|
|000022c0| 6e 64 6c 65 20 28 53 49 | 5a 45 4f 46 20 28 43 6f |ndle (SI|ZEOF (Co|
|000022d0| 6c 6f 72 54 61 62 6c 65 | 29 2b 28 74 6f 74 61 6c |lorTable|)+(total|
|000022e0| 43 6f 6c 6f 72 73 2a 53 | 49 5a 45 4f 46 28 43 6f |Colors*S|IZEOF(Co|
|000022f0| 6c 6f 72 53 70 65 63 29 | 29 29 29 3b 0d 09 49 46 |lorSpec)|)));..IF|
|00002300| 20 64 65 73 74 43 54 61 | 62 20 3d 20 4e 49 4c 20 | destCTa|b = NIL |
|00002310| 20 54 48 45 4e 20 45 78 | 69 74 20 28 53 68 69 66 | THEN Ex|it (Shif|
|00002320| 74 79 43 6f 6c 6f 72 73 | 29 3b 0d 09 50 61 6c 65 |tyColors|);..Pale|
|00002330| 74 74 65 32 43 54 61 62 | 28 63 75 72 72 50 61 6c |tte2CTab|(currPal|
|00002340| 65 74 74 65 2c 20 64 65 | 73 74 43 54 61 62 29 3b |ette, de|stCTab);|
|00002350| 0d 09 0d 09 09 7b 20 4d | 6f 76 65 20 74 68 65 20 |.....{ M|ove the |
|00002360| 63 6f 6c 6f 72 73 20 61 | 72 6f 75 6e 64 20 69 6e |colors a|round in|
|00002370| 20 74 68 65 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 | the col|or table|
|00002380| 2c 20 73 6b 69 70 70 69 | 6e 67 20 30 20 61 6e 64 |, skippi|ng 0 and|
|00002390| 20 31 2c 20 61 6e 64 20 | 6d 6f 76 69 6e 67 0d 09 | 1, and |moving..|
|000023a0| 09 61 6c 6c 20 74 68 65 | 20 65 6c 65 6d 65 6e 74 |.all the| element|
|000023b0| 73 20 64 6f 77 6e 20 62 | 79 20 6f 6e 65 2c 20 61 |s down b|y one, a|
|000023c0| 6e 64 20 63 6f 70 79 69 | 6e 67 20 74 68 65 20 65 |nd copyi|ng the e|
|000023d0| 6c 65 6d 65 6e 74 20 61 | 74 20 32 20 62 61 63 6b |lement a|t 2 back|
|000023e0| 20 74 6f 20 74 68 65 20 | 0d 09 09 65 6e 64 20 6f | to the |...end o|
|000023f0| 66 20 74 68 65 20 74 61 | 62 6c 65 2e 20 54 68 65 |f the ta|ble. The|
|00002400| 20 65 66 66 65 63 74 20 | 69 73 20 74 6f 20 72 6f | effect |is to ro|
|00002410| 74 61 74 65 20 74 68 65 | 20 63 6f 6c 6f 72 73 20 |tate the| colors |
|00002420| 69 6e 20 74 68 65 20 74 | 61 62 6c 65 2e 09 7d 0d |in the t|able..}.|
|00002430| 09 6c 61 73 74 43 53 70 | 65 63 20 3a 3d 20 64 65 |.lastCSp|ec := de|
|00002440| 73 74 43 54 61 62 5e 5e | 2e 63 74 54 61 62 6c 65 |stCTab^^|.ctTable|
|00002450| 5b 32 5d 3b 09 09 09 09 | 09 09 09 7b 20 70 75 6c |[2];....|...{ pul|
|00002460| 6c 20 66 69 72 73 74 20 | 6f 6e 65 20 6f 66 66 2e |l first |one off.|
|00002470| 20 7d 0d 09 42 6c 6f 63 | 6b 4d 6f 76 65 20 28 40 | }..Bloc|kMove (@|
|00002480| 64 65 73 74 43 54 61 62 | 5e 5e 2e 63 74 54 61 62 |destCTab|^^.ctTab|
|00002490| 6c 65 5b 33 5d 2c 20 40 | 64 65 73 74 43 54 61 62 |le[3], @|destCTab|
|000024a0| 5e 5e 2e 63 74 54 61 62 | 6c 65 5b 32 5d 2c 20 0d |^^.ctTab|le[2], .|
|000024b0| 09 09 09 09 28 6e 75 6d | 43 6f 6c 6f 72 73 29 20 |....(num|Colors) |
|000024c0| 2a 20 53 49 5a 45 4f 46 | 20 28 43 6f 6c 6f 72 53 |* SIZEOF| (ColorS|
|000024d0| 70 65 63 29 20 29 3b 09 | 09 09 09 7b 20 63 6f 70 |pec) );.|...{ cop|
|000024e0| 79 20 61 6c 6c 20 6f 6e | 65 20 65 6e 74 72 79 20 |y all on|e entry |
|000024f0| 64 6f 77 6e 2e 20 7d 0d | 09 64 65 73 74 43 54 61 |down. }.|.destCTa|
|00002500| 62 5e 5e 2e 63 74 54 61 | 62 6c 65 5b 74 6f 74 61 |b^^.ctTa|ble[tota|
|00002510| 6c 43 6f 6c 6f 72 73 2d | 31 5d 20 3a 3d 20 6c 61 |lColors-|1] := la|
|00002520| 73 74 43 53 70 65 63 3b | 09 09 09 09 7b 20 70 75 |stCSpec;|....{ pu|
|00002530| 74 20 6c 61 73 74 20 63 | 6f 6c 6f 72 20 62 61 63 |t last c|olor bac|
|00002540| 6b 20 6f 6e 20 66 72 6f | 6e 74 2e 20 7d 0d 09 09 |k on fro|nt. }...|
|00002550| 0d 09 41 6e 69 6d 61 74 | 65 50 61 6c 65 74 74 65 |..Animat|ePalette|
|00002560| 28 6d 79 57 69 6e 64 6f | 77 2c 20 64 65 73 74 43 |(myWindo|w, destC|
|00002570| 54 61 62 2c 20 32 2c 20 | 32 2c 20 6e 75 6d 43 6f |Tab, 2, |2, numCo|
|00002580| 6c 6f 72 73 29 3b 0d 09 | 0d 09 44 69 73 70 6f 73 |lors);..|..Dispos|
|00002590| 48 61 6e 64 6c 65 20 28 | 48 61 6e 64 6c 65 20 28 |Handle (|Handle (|
|000025a0| 64 65 73 74 43 54 61 62 | 29 29 3b 0d 45 4e 44 3b |destCTab|));.END;|
|000025b0| 09 7b 20 53 68 69 66 74 | 79 43 6f 6c 6f 72 73 20 |.{ Shift|yColors |
|000025c0| 7d 0d 0d 0d 09 7b 20 44 | 69 73 70 6c 61 79 20 74 |}....{ D|isplay t|
|000025d0| 68 65 20 64 69 61 6c 6f | 67 20 62 6f 78 20 69 6e |he dialo|g box in|
|000025e0| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 74 68 65 | respons|e to the|
|000025f0| 20 27 41 62 6f 75 74 20 | 54 75 62 65 54 65 73 74 | 'About |TubeTest|
|00002600| 27 20 6d 65 6e 75 20 69 | 74 65 6d 2e 20 7d 0d 50 |' menu i|tem. }.P|
|00002610| 52 4f 43 45 44 55 52 45 | 20 53 68 6f 77 41 62 6f |ROCEDURE| ShowAbo|
|00002620| 75 74 4d 65 44 69 61 6c | 6f 67 3b 0d 0d 09 56 41 |utMeDial|og;...VA|
|00002630| 52 09 09 74 68 65 44 69 | 61 6c 6f 67 3a 09 44 69 |R..theDi|alog:.Di|
|00002640| 61 6c 6f 67 50 74 72 3b | 0d 09 09 09 69 74 65 6d |alogPtr;|....item|
|00002650| 48 69 74 3a 09 49 6e 74 | 65 67 65 72 3b 0d 0d 42 |Hit:.Int|eger;..B|
|00002660| 45 47 49 4e 0d 09 74 68 | 65 44 69 61 6c 6f 67 20 |EGIN..th|eDialog |
|00002670| 3a 3d 20 47 65 74 4e 65 | 77 44 69 61 6c 6f 67 28 |:= GetNe|wDialog(|
|00002680| 61 62 6f 75 74 4d 65 44 | 4c 4f 47 2c 20 4e 49 4c |aboutMeD|LOG, NIL|
|00002690| 2c 20 57 69 6e 64 6f 77 | 50 74 72 28 20 2d 20 31 |, Window|Ptr( - 1|
|000026a0| 29 29 3b 0d 09 4d 6f 64 | 61 6c 44 69 61 6c 6f 67 |));..Mod|alDialog|
|000026b0| 28 4e 49 4c 2c 20 69 74 | 65 6d 48 69 74 29 3b 0d |(NIL, it|emHit);.|
|000026c0| 09 44 69 73 70 6f 73 44 | 69 61 6c 6f 67 28 74 68 |.DisposD|ialog(th|
|000026d0| 65 44 69 61 6c 6f 67 29 | 3b 0d 45 4e 44 3b 20 7b |eDialog)|;.END; {|
|000026e0| 20 53 68 6f 77 41 62 6f | 75 74 4d 65 44 69 61 6c | ShowAbo|utMeDial|
|000026f0| 6f 67 20 7d 0d 0d 0d 09 | 7b 20 45 78 65 63 75 74 |og }....|{ Execut|
|00002700| 65 20 6d 65 6e 75 20 63 | 6f 6d 6d 61 6e 64 20 73 |e menu c|ommand s|
|00002710| 70 65 63 69 66 69 65 64 | 20 62 79 20 6d 52 65 73 |pecified| by mRes|
|00002720| 75 6c 74 2c 20 74 68 65 | 20 72 65 73 75 6c 74 20 |ult, the| result |
|00002730| 6f 66 20 4d 65 6e 75 53 | 65 6c 65 63 74 20 7d 0d |of MenuS|elect }.|
|00002740| 50 52 4f 43 45 44 55 52 | 45 20 44 6f 43 6f 6d 6d |PROCEDUR|E DoComm|
|00002750| 61 6e 64 28 6d 52 65 73 | 75 6c 74 3a 20 4c 4f 4e |and(mRes|ult: LON|
|00002760| 47 49 4e 54 29 3b 0d 0d | 09 56 41 52 09 09 74 68 |GINT);..|.VAR..th|
|00002770| 65 49 74 65 6d 3a 09 49 | 4e 54 45 47 45 52 3b 09 |eItem:.I|NTEGER;.|
|00002780| 09 09 09 7b 20 6d 65 6e | 75 20 69 74 65 6d 20 6e |...{ men|u item n|
|00002790| 75 6d 62 65 72 20 66 72 | 6f 6d 20 6d 52 65 73 75 |umber fr|om mResu|
|000027a0| 6c 74 20 6c 6f 77 2d 6f | 72 64 65 72 20 77 6f 72 |lt low-o|rder wor|
|000027b0| 64 20 7d 0d 09 09 09 74 | 68 65 4d 65 6e 75 3a 09 |d }....t|heMenu:.|
|000027c0| 49 4e 54 45 47 45 52 3b | 09 09 09 09 7b 20 6d 65 |INTEGER;|....{ me|
|000027d0| 6e 75 20 6e 75 6d 62 65 | 72 20 66 72 6f 6d 20 6d |nu numbe|r from m|
|000027e0| 52 65 73 75 6c 74 20 68 | 69 67 68 2d 6f 72 64 65 |Result h|igh-orde|
|000027f0| 72 20 77 6f 72 64 20 7d | 0d 09 09 09 6e 61 6d 65 |r word }|....name|
|00002800| 3a 20 09 09 53 74 72 32 | 35 35 3b 09 09 09 09 09 |: ..Str2|55;.....|
|00002810| 7b 20 64 65 73 6b 20 61 | 63 63 65 73 73 6f 72 79 |{ desk a|ccessory|
|00002820| 20 6e 61 6d 65 20 7d 0d | 09 09 09 74 65 6d 70 3a | name }.|...temp:|
|00002830| 20 09 09 49 4e 54 45 47 | 45 52 3b 0d 09 09 09 64 | ..INTEG|ER;....d|
|00002840| 75 6d 6d 79 3a 09 09 42 | 6f 6f 6c 65 61 6e 3b 0d |ummy:..B|oolean;.|
|00002850| 0d 42 45 47 49 4e 0d 09 | 74 68 65 49 74 65 6d 20 |.BEGIN..|theItem |
|00002860| 3a 3d 20 4c 6f 57 6f 72 | 64 28 6d 52 65 73 75 6c |:= LoWor|d(mResul|
|00002870| 74 29 3b 09 09 09 09 09 | 7b 20 63 61 6c 6c 20 54 |t);.....|{ call T|
|00002880| 6f 6f 6c 62 6f 78 20 55 | 74 69 6c 69 74 79 20 72 |oolbox U|tility r|
|00002890| 6f 75 74 69 6e 65 73 20 | 74 6f 20 7d 0d 09 74 68 |outines |to }..th|
|000028a0| 65 4d 65 6e 75 20 3a 3d | 20 48 69 57 6f 72 64 28 |eMenu :=| HiWord(|
|000028b0| 6d 52 65 73 75 6c 74 29 | 3b 09 09 09 09 09 7b 20 |mResult)|;.....{ |
|000028c0| 73 65 74 20 6d 65 6e 75 | 20 69 74 65 6d 20 6e 75 |set menu| item nu|
|000028d0| 6d 62 65 72 20 61 6e 64 | 20 6d 65 6e 75 20 7d 0d |mber and| menu }.|
|000028e0| 0d 09 43 41 53 45 20 74 | 68 65 4d 65 6e 75 20 4f |..CASE t|heMenu O|
|000028f0| 46 09 09 09 09 09 09 09 | 09 7b 20 63 61 73 65 20 |F.......|.{ case |
|00002900| 6f 6e 20 6d 65 6e 75 20 | 49 44 20 7d 0d 0d 09 09 |on menu |ID }....|
|00002910| 61 70 70 6c 65 49 44 3a | 0d 09 09 09 49 46 20 28 |appleID:|....IF (|
|00002920| 74 68 65 49 74 65 6d 20 | 3d 20 61 62 6f 75 74 4d |theItem |= aboutM|
|00002930| 65 43 6f 6d 6d 61 6e 64 | 29 20 54 48 45 4e 20 20 |eCommand|) THEN |
|00002940| 53 68 6f 77 41 62 6f 75 | 74 4d 65 44 69 61 6c 6f |ShowAbou|tMeDialo|
|00002950| 67 0d 09 09 09 45 4c 53 | 45 0d 09 09 09 09 42 45 |g....ELS|E.....BE|
|00002960| 47 49 4e 09 09 09 09 09 | 09 09 7b 20 63 61 6c 6c |GIN.....|..{ call|
|00002970| 20 4d 65 6e 75 20 4d 61 | 6e 61 67 65 72 20 74 6f | Menu Ma|nager to|
|00002980| 20 67 65 74 20 64 65 73 | 6b 20 61 63 63 2e 7d 0d | get des|k acc.}.|
|00002990| 09 09 09 09 09 47 65 74 | 49 74 65 6d 28 6d 79 4d |.....Get|Item(myM|
|000029a0| 65 6e 75 73 5b 61 70 70 | 6c 65 4d 5d 2c 20 74 68 |enus[app|leM], th|
|000029b0| 65 49 74 65 6d 2c 20 6e | 61 6d 65 29 3b 0d 09 09 |eItem, n|ame);...|
|000029c0| 09 09 09 74 65 6d 70 20 | 3a 3d 20 4f 70 65 6e 44 |...temp |:= OpenD|
|000029d0| 65 73 6b 41 63 63 28 6e | 61 6d 65 29 3b 0d 09 09 |eskAcc(n|ame);...|
|000029e0| 09 09 09 53 65 74 50 6f | 72 74 28 6d 79 57 69 6e |...SetPo|rt(myWin|
|000029f0| 64 6f 77 29 3b 0d 09 09 | 09 09 45 4e 44 3b 20 7b |dow);...|..END; {|
|00002a00| 20 61 70 70 6c 65 49 44 | 20 7d 0d 0d 09 09 66 69 | appleID| }....fi|
|00002a10| 6c 65 49 44 3a 0d 09 09 | 09 42 45 47 49 4e 0d 09 |leID:...|.BEGIN..|
|00002a20| 09 09 09 49 46 20 74 68 | 65 49 74 65 6d 20 3d 20 |...IF th|eItem = |
|00002a30| 71 75 69 74 49 74 65 6d | 20 54 48 45 4e 20 64 6f |quitItem| THEN do|
|00002a40| 6e 65 46 6c 61 67 20 3a | 3d 20 54 52 55 45 3b 0d |neFlag :|= TRUE;.|
|00002a50| 09 09 09 09 0d 09 09 09 | 09 49 46 20 74 68 65 49 |........|.IF theI|
|00002a60| 74 65 6d 20 3d 20 74 75 | 62 75 6c 61 72 49 74 65 |tem = tu|bularIte|
|00002a70| 6d 20 54 48 45 4e 20 42 | 45 47 49 4e 0d 09 09 09 |m THEN B|EGIN....|
|00002a80| 09 09 74 75 62 65 43 68 | 65 63 6b 20 3a 3d 20 4e |..tubeCh|eck := N|
|00002a90| 4f 54 20 74 75 62 65 43 | 68 65 63 6b 3b 0d 09 09 |OT tubeC|heck;...|
|00002aa0| 09 09 09 43 68 65 63 6b | 49 74 65 6d 28 6d 79 4d |...Check|Item(myM|
|00002ab0| 65 6e 75 73 5b 66 69 6c | 65 4d 5d 2c 20 74 75 62 |enus[fil|eM], tub|
|00002ac0| 75 6c 61 72 49 74 65 6d | 2c 20 74 75 62 65 43 68 |ularItem|, tubeCh|
|00002ad0| 65 63 6b 29 3b 0d 09 09 | 09 09 45 4e 44 3b 0d 09 |eck);...|..END;..|
|00002ae0| 09 09 45 4e 44 3b 09 7b | 20 66 69 6c 65 49 44 20 |..END;.{| fileID |
|00002af0| 7d 0d 0d 09 09 65 64 69 | 74 49 44 3a 0d 09 09 09 |}....edi|tID:....|
|00002b00| 09 64 75 6d 6d 79 20 3a | 3d 20 53 79 73 74 65 6d |.dummy :|= System|
|00002b10| 45 64 69 74 28 74 68 65 | 49 74 65 6d 20 2d 20 31 |Edit(the|Item - 1|
|00002b20| 29 3b 7b 20 50 61 73 73 | 20 74 68 65 20 63 6f 6d |);{ Pass| the com|
|00002b30| 6d 61 6e 64 20 6f 6e 20 | 74 6f 20 74 68 65 20 44 |mand on |to the D|
|00002b40| 65 73 6b 20 4d 61 6e 61 | 67 65 72 2e 7d 0d 0d 09 |esk Mana|ger.}...|
|00002b50| 45 4e 44 3b 20 7b 6f 66 | 20 6d 65 6e 75 20 43 41 |END; {of| menu CA|
|00002b60| 53 45 7d 0d 0d 09 48 69 | 6c 69 74 65 4d 65 6e 75 |SE}...Hi|liteMenu|
|00002b70| 28 30 29 3b 09 09 09 09 | 09 09 7b 20 55 6e 68 69 |(0);....|..{ Unhi|
|00002b80| 67 68 6c 69 67 68 74 20 | 6d 65 6e 75 20 74 69 74 |ghlight |menu tit|
|00002b90| 6c 65 28 68 69 67 68 6c | 69 67 68 74 65 64 20 62 |le(highl|ighted b|
|00002ba0| 79 20 4d 65 6e 75 53 65 | 6c 65 63 74 29 20 7d 0d |y MenuSe|lect) }.|
|00002bb0| 45 4e 44 3b 20 7b 6f 66 | 20 44 6f 43 6f 6d 6d 61 |END; {of| DoComma|
|00002bc0| 6e 64 7d 0d 0d 0d 42 45 | 47 49 4e 20 20 7b 20 4d |nd}...BE|GIN { M|
|00002bd0| 61 69 6e 20 7d 0d 09 7b | 20 54 65 73 74 20 74 68 |ain }..{| Test th|
|00002be0| 65 20 63 6f 6d 70 75 74 | 65 72 20 74 6f 20 62 65 |e comput|er to be|
|00002bf0| 20 73 75 72 65 20 77 65 | 20 63 61 6e 20 64 6f 20 | sure we| can do |
|00002c00| 63 6f 6c 6f 72 2e 20 20 | 49 66 20 6e 6f 74 20 77 |color. |If not w|
|00002c10| 65 20 77 6f 75 6c 64 20 | 63 72 61 73 68 2c 20 77 |e would |crash, w|
|00002c20| 68 69 63 68 0d 09 77 6f | 75 6c 64 20 62 65 20 62 |hich..wo|uld be b|
|00002c30| 61 64 2e 20 20 49 66 20 | 77 65 20 63 61 6e d5 74 |ad. If |we can.t|
|00002c40| 20 72 75 6e 2c 20 6a 75 | 73 74 20 62 65 65 70 20 | run, ju|st beep |
|00002c50| 61 6e 64 20 65 78 69 74 | 2e 20 7d 0d 09 65 72 72 |and exit|. }..err|
|00002c60| 6f 72 20 3a 3d 20 53 79 | 73 45 6e 76 69 72 6f 6e |or := Sy|sEnviron|
|00002c70| 73 28 31 2c 20 74 68 65 | 57 6f 72 6c 64 29 3b 0d |s(1, the|World);.|
|00002c80| 09 49 46 20 4e 4f 54 20 | 74 68 65 57 6f 72 6c 64 |.IF NOT |theWorld|
|00002c90| 2e 68 61 73 43 6f 6c 6f | 72 51 44 20 54 48 45 4e |.hasColo|rQD THEN|
|00002ca0| 20 42 45 47 49 4e 0d 09 | 09 53 79 73 42 65 65 70 | BEGIN..|.SysBeep|
|00002cb0| 20 28 35 30 29 3b 0d 09 | 09 45 78 69 74 54 6f 53 | (50);..|.ExitToS|
|00002cc0| 68 65 6c 6c 3b 09 09 09 | 09 7b 20 49 66 20 6e 6f |hell;...|.{ If no|
|00002cd0| 20 63 6f 6c 6f 72 20 51 | 44 2c 20 77 65 20 6d 75 | color Q|D, we mu|
|00002ce0| 73 74 20 6c 65 61 76 65 | 2e 20 7d 0d 09 45 4e 44 |st leave|. }..END|
|00002cf0| 3b 0d 0d 09 49 6e 69 74 | 47 72 61 66 28 40 74 68 |;...Init|Graf(@th|
|00002d00| 65 50 6f 72 74 29 3b 0d | 09 49 6e 69 74 46 6f 6e |ePort);.|.InitFon|
|00002d10| 74 73 3b 0d 09 49 6e 69 | 74 57 69 6e 64 6f 77 73 |ts;..Ini|tWindows|
|00002d20| 3b 0d 09 49 6e 69 74 4d | 65 6e 75 73 3b 0d 09 54 |;..InitM|enus;..T|
|00002d30| 45 49 6e 69 74 3b 0d 09 | 49 6e 69 74 44 69 61 6c |EInit;..|InitDial|
|00002d40| 6f 67 73 28 4e 49 4c 29 | 3b 0d 09 49 6e 69 74 43 |ogs(NIL)|;..InitC|
|00002d50| 75 72 73 6f 72 3b 0d 0d | 09 57 49 54 48 20 73 63 |ursor;..|.WITH sc|
|00002d60| 72 65 65 6e 42 69 74 73 | 2e 62 6f 75 6e 64 73 20 |reenBits|.bounds |
|00002d70| 44 4f 0d 09 09 53 65 74 | 52 65 63 74 28 64 72 61 |DO...Set|Rect(dra|
|00002d80| 67 52 65 63 74 2c 20 34 | 2c 20 32 34 2c 20 72 69 |gRect, 4|, 24, ri|
|00002d90| 67 68 74 20 2d 20 34 2c | 20 62 6f 74 74 6f 6d 20 |ght - 4,| bottom |
|00002da0| 2d 20 34 29 3b 0d 09 64 | 6f 6e 65 46 6c 61 67 20 |- 4);..d|oneFlag |
|00002db0| 3a 3d 20 46 41 4c 53 45 | 3b 09 09 09 09 7b 20 66 |:= FALSE|;....{ f|
|00002dc0| 6c 61 67 20 74 6f 20 64 | 65 74 65 63 74 20 77 68 |lag to d|etect wh|
|00002dd0| 65 6e 20 51 75 69 74 20 | 63 6f 6d 6d 61 6e 64 20 |en Quit |command |
|00002de0| 69 73 20 63 68 6f 73 65 | 6e 7d 0d 09 74 75 62 65 |is chose|n}..tube|
|00002df0| 43 68 65 63 6b 20 3a 3d | 20 46 41 4c 53 45 3b 09 |Check :=| FALSE;.|
|00002e00| 09 09 09 7b 20 66 6c 61 | 67 20 66 6f 72 20 61 6e |...{ fla|g for an|
|00002e10| 69 6d 61 74 69 6e 67 20 | 63 6f 6c 6f 72 20 69 73 |imating |color is|
|00002e20| 20 69 6e 69 74 69 61 6c | 6c 79 20 6f 66 66 2e 20 | initial|ly off. |
|00002e30| 7d 0d 0d 09 09 7b 20 4f | 70 65 6e 20 74 68 65 20 |}....{ O|pen the |
|00002e40| 63 6f 6c 6f 72 20 77 69 | 6e 64 6f 77 2e 20 7d 0d |color wi|ndow. }.|
|00002e50| 09 6d 79 57 69 6e 64 6f | 77 20 3a 3d 20 47 65 74 |.myWindo|w := Get|
|00002e60| 4e 65 77 43 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f |NewCWind|ow(windo|
|00002e70| 77 49 44 2c 20 4e 49 4c | 2c 20 50 4f 49 4e 54 45 |wID, NIL|, POINTE|
|00002e80| 52 28 2d 31 29 29 3b 0d | 09 53 65 74 50 6f 72 74 |R(-1));.|.SetPort|
|00002e90| 28 6d 79 57 69 6e 64 6f | 77 29 3b 0d 0d 09 09 7b |(myWindo|w);....{|
|00002ea0| 20 53 65 74 20 75 70 20 | 6d 65 6e 75 73 20 6c 61 | Set up |menus la|
|00002eb0| 73 74 2c 20 73 69 6e 63 | 65 20 74 68 65 20 6d 65 |st, sinc|e the me|
|00002ec0| 6e 75 20 64 72 61 77 69 | 6e 67 20 63 61 6e 20 74 |nu drawi|ng can t|
|00002ed0| 68 65 6e 20 75 73 65 20 | 74 68 65 20 70 61 6c 65 |hen use |the pale|
|00002ee0| 74 74 65 20 77 65 20 68 | 61 76 65 20 66 6f 72 20 |tte we h|ave for |
|00002ef0| 6f 75 0d 09 09 77 69 6e | 64 6f 77 2e 20 4d 61 6b |ou...win|dow. Mak|
|00002f00| 65 73 20 74 68 65 20 41 | 70 70 6c 65 20 6c 6f 6f |es the A|pple loo|
|00002f10| 6b 20 62 65 74 74 65 72 | 2c 20 69 6e 20 70 61 72 |k better|, in par|
|00002f20| 74 69 63 75 6c 61 72 2e | 20 7d 0d 09 53 65 74 55 |ticular.| }..SetU|
|00002f30| 70 4d 65 6e 75 73 3b 0d | 09 0d 09 7b 20 4d 61 69 |pMenus;.|...{ Mai|
|00002f40| 6e 20 45 76 65 6e 74 20 | 4c 6f 6f 70 20 7d 0d 09 |n Event |Loop }..|
|00002f50| 52 45 50 45 41 54 0d 09 | 09 53 79 73 74 65 6d 54 |REPEAT..|.SystemT|
|00002f60| 61 73 6b 3b 0d 0d 09 09 | 49 46 20 47 65 74 4e 65 |ask;....|IF GetNe|
|00002f70| 78 74 45 76 65 6e 74 28 | 65 76 65 72 79 45 76 65 |xtEvent(|everyEve|
|00002f80| 6e 74 2c 20 6d 79 45 76 | 65 6e 74 29 20 54 48 45 |nt, myEv|ent) THE|
|00002f90| 4e 0d 09 09 09 43 41 53 | 45 20 6d 79 45 76 65 6e |N....CAS|E myEven|
|00002fa0| 74 2e 77 68 61 74 20 4f | 46 09 09 09 7b 20 63 61 |t.what O|F...{ ca|
|00002fb0| 73 65 20 6f 6e 20 65 76 | 65 6e 74 20 74 79 70 65 |se on ev|ent type|
|00002fc0| 7d 0d 0d 09 09 09 09 6d | 6f 75 73 65 44 6f 77 6e |}......m|ouseDown|
|00002fd0| 3a 0d 09 09 09 09 09 43 | 41 53 45 20 46 69 6e 64 |:......C|ASE Find|
|00002fe0| 57 69 6e 64 6f 77 28 6d | 79 45 76 65 6e 74 2e 77 |Window(m|yEvent.w|
|00002ff0| 68 65 72 65 2c 20 77 68 | 69 63 68 57 69 6e 64 6f |here, wh|ichWindo|
|00003000| 77 29 20 4f 46 0d 0d 09 | 09 09 09 09 09 69 6e 53 |w) OF...|.....inS|
|00003010| 79 73 57 69 6e 64 6f 77 | 3a 09 09 09 09 7b 20 64 |ysWindow|:....{ d|
|00003020| 65 73 6b 20 61 63 63 65 | 73 73 6f 72 79 20 77 69 |esk acce|ssory wi|
|00003030| 6e 64 6f 77 3a 20 63 61 | 6c 6c 20 44 65 73 6b 20 |ndow: ca|ll Desk |
|00003040| 4d 61 6e 61 67 65 72 20 | 74 6f 20 68 61 6e 64 6c |Manager |to handl|
|00003050| 65 20 69 74 7d 0d 09 09 | 09 09 09 09 09 09 53 79 |e it}...|......Sy|
|00003060| 73 74 65 6d 43 6c 69 63 | 6b 28 6d 79 45 76 65 6e |stemClic|k(myEven|
|00003070| 74 2c 20 77 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |t, which|Window);|
|00003080| 0d 0d 09 09 09 09 09 09 | 69 6e 4d 65 6e 75 42 61 |........|inMenuBa|
|00003090| 72 3a 09 09 09 09 09 7b | 20 4d 65 6e 75 20 62 61 |r:.....{| Menu ba|
|000030a0| 72 3a 20 6c 65 61 72 6e | 20 77 68 69 63 68 20 63 |r: learn| which c|
|000030b0| 6f 6d 6d 61 6e 64 2c 20 | 74 68 65 6e 20 65 78 65 |ommand, |then exe|
|000030c0| 63 75 74 65 20 69 74 2e | 20 7d 0d 09 09 09 09 09 |cute it.| }......|
|000030d0| 09 09 09 44 6f 43 6f 6d | 6d 61 6e 64 28 4d 65 6e |...DoCom|mand(Men|
|000030e0| 75 53 65 6c 65 63 74 28 | 6d 79 45 76 65 6e 74 2e |uSelect(|myEvent.|
|000030f0| 77 68 65 72 65 29 29 3b | 0d 0d 09 09 09 09 09 09 |where));|........|
|00003100| 69 6e 44 72 61 67 3a 09 | 09 09 09 09 09 7b 20 74 |inDrag:.|.....{ t|
|00003110| 69 74 6c 65 20 62 61 72 | 3a 20 63 61 6c 6c 20 57 |itle bar|: call W|
|00003120| 69 6e 64 6f 77 20 4d 61 | 6e 61 67 65 72 20 74 6f |indow Ma|nager to|
|00003130| 20 64 72 61 67 7d 0d 09 | 09 09 09 09 09 09 09 44 | drag}..|.......D|
|00003140| 72 61 67 57 69 6e 64 6f | 77 28 77 68 69 63 68 57 |ragWindo|w(whichW|
|00003150| 69 6e 64 6f 77 2c 20 6d | 79 45 76 65 6e 74 2e 77 |indow, m|yEvent.w|
|00003160| 68 65 72 65 2c 20 64 72 | 61 67 52 65 63 74 29 3b |here, dr|agRect);|
|00003170| 0d 0d 09 09 09 09 09 09 | 69 6e 43 6f 6e 74 65 6e |........|inConten|
|00003180| 74 3a 09 09 09 09 09 7b | 20 62 6f 64 79 20 6f 66 |t:.....{| body of|
|00003190| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 77 69 6e | applica|tion win|
|000031a0| 64 6f 77 3a 20 7d 0d 09 | 09 09 09 09 09 09 09 49 |dow: }..|.......I|
|000031b0| 46 20 77 68 69 63 68 57 | 69 6e 64 6f 77 20 3c 3e |F whichW|indow <>|
|000031c0| 20 66 72 6f 6e 74 57 69 | 6e 64 6f 77 20 54 48 45 | frontWi|ndow THE|
|000031d0| 4e 0d 09 09 09 09 09 09 | 09 09 09 53 65 6c 65 63 |N.......|...Selec|
|000031e0| 74 57 69 6e 64 6f 77 28 | 77 68 69 63 68 57 69 6e |tWindow(|whichWin|
|000031f0| 64 6f 77 29 3b 20 7b 61 | 6e 64 20 6d 61 6b 65 20 |dow); {a|nd make |
|00003200| 69 74 20 61 63 74 69 76 | 65 20 69 66 20 6e 6f 74 |it activ|e if not|
|00003210| 7d 0d 09 09 09 09 09 45 | 4e 44 3b 20 7b 6f 66 20 |}......E|ND; {of |
|00003220| 6d 6f 75 73 65 44 6f 77 | 6e 7d 0d 0d 09 09 09 09 |mouseDow|n}......|
|00003230| 75 70 64 61 74 65 45 76 | 74 3a 09 09 09 09 09 09 |updateEv|t:......|
|00003240| 09 7b 20 55 70 64 61 74 | 65 20 74 68 65 20 65 79 |.{ Updat|e the ey|
|00003250| 65 73 20 69 6e 20 77 69 | 6e 64 6f 77 2e 20 7d 0d |es in wi|ndow. }.|
|00003260| 09 09 09 09 09 49 46 20 | 57 69 6e 64 6f 77 50 74 |.....IF |WindowPt|
|00003270| 72 28 6d 79 45 76 65 6e | 74 2e 6d 65 73 73 61 67 |r(myEven|t.messag|
|00003280| 65 29 20 3d 20 6d 79 57 | 69 6e 64 6f 77 20 54 48 |e) = myW|indow TH|
|00003290| 45 4e 0d 09 09 09 09 09 | 09 42 45 47 49 4e 0d 09 |EN......|.BEGIN..|
|000032a0| 09 09 09 09 09 09 42 65 | 67 69 6e 55 70 64 61 74 |......Be|ginUpdat|
|000032b0| 65 28 57 69 6e 64 6f 77 | 50 74 72 28 6d 79 45 76 |e(Window|Ptr(myEv|
|000032c0| 65 6e 74 2e 6d 65 73 73 | 61 67 65 29 29 3b 0d 09 |ent.mess|age));..|
|000032d0| 09 09 09 09 09 09 09 44 | 72 61 77 45 79 65 73 3b |.......D|rawEyes;|
|000032e0| 0d 09 09 09 09 09 09 09 | 45 6e 64 55 70 64 61 74 |........|EndUpdat|
|000032f0| 65 28 57 69 6e 64 6f 77 | 50 74 72 28 6d 79 45 76 |e(Window|Ptr(myEv|
|00003300| 65 6e 74 2e 6d 65 73 73 | 61 67 65 29 29 3b 0d 09 |ent.mess|age));..|
|00003310| 09 09 09 09 09 45 4e 44 | 3b 20 7b 6f 66 20 75 70 |.....END|; {of up|
|00003320| 64 61 74 65 45 76 74 7d | 0d 09 09 09 09 09 09 09 |dateEvt}|........|
|00003330| 0d 09 09 09 09 6b 65 79 | 44 6f 77 6e 2c 20 61 75 |.....key|Down, au|
|00003340| 74 6f 4b 65 79 3a 09 09 | 09 09 09 7b 20 6b 65 79 |toKey:..|...{ key|
|00003350| 20 70 72 65 73 73 65 64 | 20 6f 6e 63 65 20 6f 72 | pressed| once or|
|00003360| 20 68 65 6c 64 20 64 6f | 77 6e 20 74 6f 20 72 65 | held do|wn to re|
|00003370| 70 65 61 74 20 7d 0d 09 | 09 09 09 09 49 46 20 6d |peat }..|....IF m|
|00003380| 79 57 69 6e 64 6f 77 20 | 3d 20 66 72 6f 6e 74 57 |yWindow |= frontW|
|00003390| 69 6e 64 6f 77 20 54 48 | 45 4e 0d 09 09 09 09 09 |indow TH|EN......|
|000033a0| 09 42 45 47 49 4e 0d 09 | 09 09 09 09 09 09 74 68 |.BEGIN..|......th|
|000033b0| 65 43 68 61 72 20 3a 3d | 20 43 48 52 28 42 41 6e |eChar :=| CHR(BAn|
|000033c0| 64 28 6d 79 45 76 65 6e | 74 2e 6d 65 73 73 61 67 |d(myEven|t.messag|
|000033d0| 65 2c 20 63 68 61 72 43 | 6f 64 65 4d 61 73 6b 29 |e, charC|odeMask)|
|000033e0| 29 3b 20 7b 20 67 65 74 | 20 74 68 65 20 63 68 61 |); { get| the cha|
|000033f0| 72 20 7d 0d 09 09 09 09 | 09 09 09 09 7b 20 49 66 |r }.....|....{ If|
|00003400| 20 43 6f 6d 6d 61 6e 64 | 20 6b 65 79 20 64 6f 77 | Command| key dow|
|00003410| 6e 2c 20 64 6f 20 69 74 | 20 61 73 20 61 20 4d 65 |n, do it| as a Me|
|00003420| 6e 75 20 43 6f 6d 6d 61 | 6e 64 2e 20 7d 0d 09 09 |nu Comma|nd. }...|
|00003430| 09 09 09 09 09 49 46 20 | 42 41 6e 64 28 6d 79 45 |.....IF |BAnd(myE|
|00003440| 76 65 6e 74 2e 6d 6f 64 | 69 66 69 65 72 73 2c 20 |vent.mod|ifiers, |
|00003450| 63 6d 64 4b 65 79 29 20 | 3c 3e 20 30 20 54 48 45 |cmdKey) |<> 0 THE|
|00003460| 4e 20 44 6f 43 6f 6d 6d | 61 6e 64 28 4d 65 6e 75 |N DoComm|and(Menu|
|00003470| 4b 65 79 28 74 68 65 43 | 68 61 72 29 29 3b 0d 09 |Key(theC|har));..|
|00003480| 09 09 09 09 09 45 4e 44 | 3b 20 7b 6f 66 20 6b 65 |.....END|; {of ke|
|00003490| 79 44 6f 77 6e 20 61 6e | 64 20 61 75 74 6f 4b 65 |yDown an|d autoKe|
|000034a0| 79 7d 0d 0d 09 09 09 45 | 4e 44 3b 20 7b 6f 66 20 |y}.....E|ND; {of |
|000034b0| 65 76 65 6e 74 20 43 41 | 53 45 7d 0d 0d 09 09 09 |event CA|SE}.....|
|000034c0| 7b 20 49 66 20 77 65 20 | 68 61 76 65 20 6d 65 6e |{ If we |have men|
|000034d0| 75 20 69 74 65 6d 20 63 | 68 65 63 6b 65 64 2c 20 |u item c|hecked, |
|000034e0| 67 6f 20 61 68 65 61 64 | 20 61 6e 64 20 61 6e 69 |go ahead| and ani|
|000034f0| 6d 61 74 65 20 63 6f 6c | 6f 72 73 2e 20 7d 0d 09 |mate col|ors. }..|
|00003500| 09 49 46 20 74 75 62 65 | 43 68 65 63 6b 20 54 48 |.IF tube|Check TH|
|00003510| 45 4e 20 53 68 69 66 74 | 79 43 6f 6c 6f 72 73 3b |EN Shift|yColors;|
|00003520| 0d 09 09 0d 09 55 4e 54 | 49 4c 20 64 6f 6e 65 46 |.....UNT|IL doneF|
|00003530| 6c 61 67 3b 0d 0d 09 09 | 7b 20 63 6c 65 61 6e 20 |lag;....|{ clean |
|00003540| 75 70 20 61 66 74 65 72 | 20 70 61 6c 65 74 74 65 |up after| palette|
|00003550| 20 6d 61 6e 61 67 65 72 | 2c 20 73 6f 20 68 65 20 | manager|, so he |
|00003560| 63 61 6e 20 63 68 75 63 | 6b 20 74 68 65 20 70 61 |can chuc|k the pa|
|00003570| 6c 65 74 74 65 20 69 6e | 20 75 73 65 2e 20 7d 0d |lette in| use. }.|
|00003580| 09 44 69 73 70 6f 73 65 | 57 69 6e 64 6f 77 20 28 |.Dispose|Window (|
|00003590| 6d 79 57 69 6e 64 6f 77 | 29 3b 0d 09 0d 45 4e 44 |myWindow|);...END|
|000035a0| 2e 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 00 00 01 00 00 00 01 69 | 00 00 00 69 00 00 00 46 |.......i|...i...F|
|00003610| 2c 78 b4 00 2b d9 20 00 | 41 7a 12 00 2a ed de 40 |,x..+. .|Az..*..@|
|00003620| 80 65 5c 00 3d ea 86 00 | 00 00 07 00 00 00 00 01 |.e\.=...|........|
|00003630| 0a 54 75 62 65 54 65 73 | 74 2e 70 54 02 00 00 00 |.TubeTes|t.pT....|
|00003640| 54 45 58 54 4d 50 53 20 | 01 00 00 14 01 80 00 00 |TEXTMPS |........|
|00003650| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 14 01 80 |..TEXTMP|S ......|
|00003660| 00 00 62 7f 00 00 00 00 | 00 00 00 00 00 00 00 00 |..b.....|........|
|00003670| 00 00 9f b9 93 40 00 00 | 35 22 00 00 01 af ff 00 |.....@..|5"......|
|00003680| 00 00 6d 00 00 00 00 00 | 02 ff ff 00 00 bc 33 00 |..m.....|......3.|
|00003690| 00 00 00 00 06 ff ff 00 | 00 bd 23 00 00 00 00 00 |........|..#.....|
|000036a0| 00 ff ff 00 00 be 27 00 | 00 00 00 48 c0 2f 00 ff |......'.|...H./..|
|000036b0| ff ff ff 01 00 00 32 00 | 3e 12 78 00 00 00 00 01 |......2.|>.x.....|
|000036c0| 00 06 ad 00 00 00 82 01 | 00 bb c2 00 00 00 00 9e |........|........|
|000036d0| dd 87 fb 00 94 00 2d a2 | f4 f1 07 00 4b 4e ad 0c |......-.|....KN..|
|000036e0| f2 01 00 00 5a 01 00 45 | be ff ff ff ff 00 00 00 |....Z..E|........|
|000036f0| 10 01 00 00 04 ff ff ff | ff de 98 48 c0 00 6e 31 |........|...H..n1|
|00003700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 2d 2d 2d |...H..Mo|naco.---|
|00003710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003720| 2d 2d 2d 2d 2d 2d 00 06 | 00 04 00 31 00 0a 01 49 |------..|...1...I|
|00003730| 01 ea 00 31 00 0a 01 49 | 01 ea 9f 8a a5 f9 00 00 |...1...I|........|
|00003740| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 19 |........|........|
|00003750| 03 00 80 00 00 00 03 33 | 2e 30 0e 4d 50 57 20 50 |.......3|.0.MPW P|
|00003760| 61 73 63 61 6c 20 33 2e | 30 00 00 01 00 00 00 01 |ascal 3.|0.......|
|00003770| 69 00 00 00 69 00 00 00 | 46 00 21 64 f4 06 9e 00 |i...i...|F.!d....|
|00003780| 00 00 1c 00 46 00 01 4d | 50 53 52 00 00 00 12 76 |....F..M|PSR....v|
|00003790| 65 72 73 00 00 00 1e 03 | ed ff ff 00 00 00 00 00 |ers.....|........|
|000037a0| 00 00 00 00 02 ff ff 20 | 00 00 4c 00 21 63 48 00 |....... |..L.!cH.|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+